This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: memory leak in java/lang/

Hash: SHA1

Am Mittwoch, 2. Juli 2003 05:54 schrieb Tom Tromey:
> >>>>> "Michael" == Michael Koch <> writes:
> Michael> I found another memory leak in java/lang/ in
> Michael> _Jv_PrepareConstantTimeTables. The attached patch moves
> two abortion Michael> checks before the allocation of memory.
> Michael> Okay to commit to trunk ?
> I don't think this change is correct.  With this patch,
> klass->ancestors will remain NULL.  However that indicates that the
> tables haven't been prepared at all.
> What do you think about that?
> There is still a leak here.  This memory should be properly freed
> when the class is finalized.  One way would be to add code to
> Class.finalize.  However, I'd really like to get rid of this method
> entirely, if possible.  So another approach would be to arrange for
> some of these fields to be allocated via the collector (and marked
> as well, of course).

You're right. After sending this mail I found more "possible" memory 
leaks. GCing the data allocated by this method is surely a solution. 
I dont know enough about this stuff yet to say more. I need to look 
deeper into it.

- -- 
Version: GnuPG v1.2.1 (GNU/Linux)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]