Memory problem
Boehm, Hans
hans.boehm@hp.com
Fri Dec 9 22:52:00 GMT 2005
As far as I know, yes.
Hans
> -----Original Message-----
> From: java-owner@gcc.gnu.org [mailto:java-owner@gcc.gnu.org]
> On Behalf Of Gabriel Bianco
> Sent: Thursday, December 08, 2005 3:56 PM
> To: java@gcc.gnu.org
> Subject: 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.
>>
More information about the Java
mailing list