Question: How can I free memory for this new statement with delete?? C++ bool BurgerShop: : makeMeat (int doneness) if(isStorageFull()) //cannot make new meats when the
How can I free memory for this "new" statement with delete?? C++

bool BurgerShop: : makeMeat (int doneness) if(isStorageFull()) //cannot make new meats when the storage is full return false; addFoodToStorage(new Meat(doneness)); //actually make it and store it return true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
