I have an object, that can detect a click over it, like a button, I add a callback to this object, the thing is, in that function the object deletes itself, well, is not directly deleted, it calls many other functions that ends up deleting the object.
so the function is not finished when the object is already deleted. in some devices this has no problem, but in other one, sometimes I have a heap corruption error
, I couldn't bind this error with anything in my code, until now.
so, my question is. Can a callback (that is a variable member rather than a method) keep running even if the object is deleted?
the callback doesn't use/need any of the object members to finish appropriately.
Can this produce a heap corruption
?
Aucun commentaire:
Enregistrer un commentaire