- When I delete an object, are objects referenced within deleted as well?
- Fruit^ my_fruit = gcnew Fruit;
- Apple^ first_apple = gcnew Apple;
- Apple^ second_apple = gcnew Apple;
- my_fruit->AppleList->Add(first_apple);
- my_fruit->AppleList->Add(second_apple);
- // some operations
- delete my_fruit; // **is it enough to avoid memory leak, is it necessary to delete first and second apple objects?**