Advertisement
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.
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.