Jump to content

  • Log In with Google      Sign In   
  • Create Account

JiiPee

Member Since 06 Oct 2012
Offline Last Active Jul 01 2013 04:00 AM

#5015524 How to check if dynamic memory is there before deleting?

Posted by JiiPee on 29 December 2012 - 02:19 PM

If memory is not there, then you can't even allocate memory, otherwise if you have succesfully allocated memory with new then there is reserved memory size of the data type. I think you should perhaps think otherway around, how to ensure that there is memory before allocating or if program can't allocate memory then how to catch exceptions and what are actions to avoid useless deletions.




PARTNERS