this – Zeiger

Was passiert, wenn man in einer Public Memberfunktion den this Zeiger löscht?

Bsp.:

main ()
{

Classname * variable;

variable = new Classname;

variable->Memberfkt ();
}

Classname:: Mebmerfkt ()
{
delete Classname;

this = NULL;

}

Leave a Reply

Your email address will not be published. Required fields are marked *