Closed marcospassos closed 7 years ago
Are you sure it's not already the case ?
The code is not very clear about it... I see a JavaProxy::destruct() method that will unref the javaobject on the JVM side. So basically unset($javaObject)
should trigger `destruct()that will delegate a call to the bridge
Client::unref($object_id)`.
I'm not 100% sure, but looks the phpjavabridge already handles that: explicitly by calling unset
or implicitly when objects are garbage collected on the PHP side. One exception is when the script ends, the protocol will be closed. So I suppose the bridge server handles that when closing the connection.
Should work like that, otherwise I would have seen a ever growing memory on my bridge.
Feel free to search on that, it can be helpful
Hi @belgattitude!
Is there any way to destruct an object on the Java side to free memory?