Board index » cppbuilder » CreateMessageDialog and delete?

CreateMessageDialog and delete?


2004-02-28 01:11:36 AM
cppbuilder37
I am using CreateMessageDialog to create a form:
pform = CreateMessageDialog(...);
I would like to free the memory after I am done using it. I call:
delete pform;
Is this okay? I am concerned because after I create the form I check
"pform->Owner" and it is equal to "Application".
Thanks,
- Fred
 
 

Re:CreateMessageDialog and delete?

"Fred W." < XXXX@XXXXX.COM >wrote in message
Quote
Is this okay?
Yes.
Quote
I am concerned because after I create the form I check
"pform->Owner" and it is equal to "Application".
That is fine. You can safely free an owned component manually. When an
Owned component is freed, it removes itself from its Owner's internal list
so the Owner doesn't try to free it again later.
Gambit