[pylucene-dev] memory leak status
vajda at osafoundation.org
Fri Jan 11 08:31:31 PST 2008
On Fri, 11 Jan 2008, Pete wrote:
> On Thursday January 10 2008 5:56:53 pm Andi Vajda wrote:
>> On Thu, 10 Jan 2008, Andi Vajda wrote:
>>> I think I'm going to be adding support for the manual way via
>>> finalize() shortly.
>> This just got checked in to rev 377.
> Can finalize be called for 'regular' Java instances, or only Python
> extensions? If the later, it's gonna make writing generic code that uses
> such instances harder. Actually, I'm not sure how to do such a thing...
finalize() is to be called only on extensions. Normally, the Java finalize()
method is protected, not public, and does nothing. Therefore not wrapper
is generated for it by jcc. For extensions, though, finalize() helps in
breaking the "deadly embrace" ref cycle between both VMs, Python and Java.
An example of finalize() use is to be found in test/test_PythonDirectory.py.
More information about the pylucene-dev