|
Re: problem memory with memory management: msg#00016lang.jython.user
[ Carlos Garcia ] > I have a memory leak in an application that uses the Python.exec() > method multiple times, > i can see in jprobe that instance of classes org.python.pycode._pyx* > and > org.python.proxies.* dynamically created during an exec are not > cleaned by the > garbage collector, i can see in jprobre that there is a static member > of otsself that > do not allow the garbage colector to clean it > > Any idea about what can i do? Hi Carlos, try using weak references for internal tables, e.g. in the registry file: # List of choices for internal tables impl (PyJavaClasses canonical map etc.), # these are separated through ':' and tryed from left to right. # For long running applications under java2, needing classes unloading, # in order to have jython runtime automatically discarding # no longer needed info and avoding memory leakage, this can be set # to weak or soft (=> an impl. using weak-refs or soft-refs will be used). #python.options.internalTablesImpl = soft python.options.internalTablesImpl = weak In my case, weak solved a memory leak, while soft was no help. Best wishes, Oti. ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Jython parser (future), Fabio Zadrozny |
|---|---|
| Next by Date: | infinite loop ?, Jean Guillaume LALANNE |
| Previous by Thread: | problem memory with memory management, Carlos Garcia |
| Next by Thread: | Jython Demo Applets, Prakash |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |