Mercurial > hg > Members > sugi > memoryleak
comparison src/example2/MyStack.java @ 1:0a4fdcd1ed46 default tip
minor change
author | e095732 |
---|---|
date | Tue, 29 Jan 2013 15:27:43 +0900 |
parents | 4dbea8e22628 |
children |
comparison
equal
deleted
inserted
replaced
0:4dbea8e22628 | 1:0a4fdcd1ed46 |
---|---|
1 package example2; | 1 package example2; |
2 | |
3 /** | |
4 * 実行させてもMemory Leakはしません | |
5 * 参照が残り続けるStackなのでたくさん生成するといつかMemory Leakを起こす | |
6 */ | |
2 | 7 |
3 public class MyStack { | 8 public class MyStack { |
4 private Object[] stack; | 9 private Object[] stack; |
5 private int size = 0; | 10 private int size = 0; |
6 private static final int MAX_SIZE = 16; | 11 private static final int MAX_SIZE = 16; |