Destroy the class from itself

Login to reply to this topic.
Thu, 2005-02-17 14:57
Joined: 2005-02-15
Forum posts: 12
Hi all,

How can I destroy the class from itself, when a function in the class is called?

Thanks for the answare in advance!

Best regards,
Balint Toth

Thu, 2005-02-17 15:02
Joined: 2005-02-16
Forum posts: 22
Destroy the class from itself
"delete this;"

Do not, obviously, reference any member variables etc in the control after that.

Generally, functions that destroy themselves finish in a capital D.

The only general use of a -D function that I can think off of the top of my head is CEikDialog::ExecuteLD.

Use with care!
  • Login to reply to this topic.