A Journey 2 Eternity

Safe memory deletion

Posted on: December 31, 2007

Always Set NULL when delete a memory. Otherwise the program may crash when the variable further referenced.

delete m_pComboArgs;
m_pComboArgs = NULL;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Pages

Categories

December 2007
M T W T F S S
« Nov   Mar »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Blog Stats

  • 26,968 hits
%d bloggers like this: