Class DisposablePyObjectAdapter
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.script.DisposablePyObjectAdapter
 
- 
- All Implemented Interfaces:
- org.python.core.adapter.PyObjectAdapter
 
 public class DisposablePyObjectAdapter extends java.lang.Object implements org.python.core.adapter.PyObjectAdapterThis class exists so that modules can add PyObjectAdapter to the global, static extensible adapter found atPy.getAdapter()in a way that can prevent leaking the module's classloader. The module wraps up their object adapter in this wrapper, and ensures to calldispose()when the module is shut down. This will still cause a memory leak, albeit extremely small: one adapter object per module (re-)start. This is the only way to be able to use this part of the Jython API because they don't provide for removing adapters that have been registered.
- 
- 
Constructor SummaryConstructors Constructor Description DisposablePyObjectAdapter(org.python.core.adapter.PyObjectAdapter delegate)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description org.python.core.PyObjectadapt(java.lang.Object o)booleancanAdapt(java.lang.Object o)voiddispose()
 
- 
- 
- 
Method Detail- 
disposepublic void dispose() 
 - 
canAdaptpublic boolean canAdapt(java.lang.Object o) - Specified by:
- canAdaptin interface- org.python.core.adapter.PyObjectAdapter
 
 - 
adaptpublic org.python.core.PyObject adapt(java.lang.Object o) - Specified by:
- adaptin interface- org.python.core.adapter.PyObjectAdapter
 
 
- 
 
-