Question with objects

Hello. When destroying an object that inherits from a superclass, should the superclass have a method which nullifies itself or should the subclass which the object comes from have a method to nullify itself?

Thank you for any answers.

1 Like

The superclass should, so all subclasses can inherit the same method. If you need different nullifying behavior for a subclass, then write a non-inherited one.

2 Likes