Posted: June 30, 2011 15:00 by LizardSF
I have two problems I'm hoping I can get help with.
First, to solve some issues with passing by value instead of by reference, I took the advice of the documentation and wrapped an object in a Remote() call. This created an oddity, in that the object as seen be the class that receives it is remote_stub, not remote. Because other objects manipulated by the same code are wrapped in remote, I have ended up using the very clunky "if(s.getClass() == Remote.class)" to handle the different wrappers (Remote and Remote_Stub). This is kludgy and ugly and makes me feel very stupid for not understanding the underlying mechanism better, but it works for testing purposes.
The second issue is that when I shut down the app, there are many objects still instantiated. What is the best way to shut down/dismiss/get rid of a cajo object? It seems that there's still pointers to them in the JVm, and unless I use ctrl-c or otherwise force shut down, they remain.