This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
heap allocation and gc with gcj
- From: Vladimir Leven <vladimirl at wrx-ca dot com>
- To: java at gcc dot gnu dot org
- Date: Tue, 04 May 2004 16:16:44 -0600
- Subject: heap allocation and gc with gcj
- References: <40633001.3090605@wrx-ca.com> <408935D7.2060600@wrx-ca.com> <408E92C7.9090302@wrx-ca.com>
Using GCJ (3.2.2) If I do the following in a loop:
while (true) {
byte[] bytes = new byte[1024];
//do some unrelated stuff
bytes = null;
}
Will the array be allocated each time the loop runs or will the compiler
remove it because it is not used in the method? What about if it is a
public instance variable?
Thanks,
Vlad