Page 1 of 1

LM_REMOVECHILD frees removed object ?

PostPosted: Thu Oct 26, 2017 12:56 pm
by glames
Hi,

I'd like ot know if LM_REMOVECHILD method frees the removed object ?

From autodoc:
LM_REMOVECHILD -- Remove object from active layout.


I understand that it just removes the object from the layout but that it still lives.
But if I dispose the object after having removed it from layout, it freezes Amiga.

So I guess it removes AND disposes the object?

Re: LM_REMOVECHILD frees removed object ?

PostPosted: Thu Oct 26, 2017 4:09 pm
by glames
OK, I reply to myself.

The SDK example "dynamicexample" confirms that it disposes the object after removing it from the layout.

Maybe the auto doc should be modified?

Re: LM_REMOVECHILD frees removed object ?

PostPosted: Fri Oct 27, 2017 3:03 am
by broadblues
The current autodoc says the following:

After successfully removing the object, this method will dispose
of the object via the DisposeObject() function.


BTW if you don't want it disposed of you can set CHILD_NoDispose,TRUE

Re: LM_REMOVECHILD frees removed object ?

PostPosted: Fri Oct 27, 2017 12:35 pm
by glames
Hi Andy,

It seems that I didn't read the autodoc until it ;)

Thank you for your reply.

Cheers,
Glames