Message5829

Author zyasoft
Recipients adam.spiers, bpedman, matt_brinkley, pjenvey, rkurin, zyasoft
Date 2010-06-22.05:43:44
SpamBayes Score 0.018525185
Marked as misclassified No
Message-id <1277185427.47.0.336601645497.issue1522@psf.upfronthosting.co.za>
In-reply-to
Content
I read this bug with interest because any such memory leak bug is critical, and thus blocks 2.5.2. When I first looked at it, I only noticed the mapping of Java classes to Python types in our expose (a relatively small set of classes); however, on second look, it's also of course used by for our general Java proxy support. Hence the concern.

It would seem to me the easiest thing to do is use a WeakHashMap to track this - we only care to keep this around in PyType#class_to_type when there are still objects out there using these classes (as referenced by PyType#underlying_class, or perhaps other references).

I have attached a very small patch that passes the regrtest. Essentially it just does this change in the initialization of the class_to_type map:

class_to_type = Generic.synchronizedWeakHashMap();

Please try this and see if it addresses these memory leaks.
History
Date User Action Args
2010-06-22 05:43:47zyasoftsetmessageid: <1277185427.47.0.336601645497.issue1522@psf.upfronthosting.co.za>
2010-06-22 05:43:47zyasoftsetrecipients: + zyasoft, pjenvey, matt_brinkley, bpedman, rkurin, adam.spiers
2010-06-22 05:43:47zyasoftlinkissue1522 messages
2010-06-22 05:43:46zyasoftcreate