What is an appropriate way of removing my_object as shown below?
my_object
my_class *my_object = new my_class();
delete(my_object);
free(my_object);
The garbage collector will destroy the object eventually.
Exiting the scope will destroy the object.