This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Memory problem
Hi, thanks a lot for the response... I'm still not clear on this though:
> > Second, when I start a Java thread from C++ code do I need to
> > do anything else before I start it, something similar to
> > JvAttachCurrentThread\JvDetachCurrentThread?
> That's a standing issue. Currently it's not recommended that you create
> a thread from C++ code and then run Java in it. At least if the thread
> creation is done in a library outside your control, so that it can't be
> turned into a GC_pthread_create. We're slowly moving towards a
> solution.
>
I'm not sure we are talking about the same thing :-)... I have had some
problems when I create a regular thread and have it run Java code, so I
decided to try creating a Java thread... That did do the trick, fixed the
problems, but I was worried that the memory it allocated wasn't being
released because I wasn't registering/unregistering it...
Right now I just create the thread and call start()...
Thread* th = new MyThread();
th->start();
Is that also not recommended? And is that all I need to do?
Thanks, Gabriel Bianco.