Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actualjbadams

Posted 04 April 2013 - 05:32 AM

Just open the memory output pane, look at said location, then look what variable is allocated at this location. Might take some time but it work. Also, using those macros would really decrease your code size:

 

#define SAFE_RELEASE(x)   if((x) != NULL){(x)->Release();(x) = NULL;} #define SAFE_DELETE_ARRAY(x) if((x) != NULL){delete[] (x);(x) = NULL;} #define SAFE_DELETE_OBJECT(x)  if((x) != NULL){delete (x);(x) = NULL;}  

I don't understand why anybody use them anymore, they used to come with the directx sdk and are really awsome at saving space (deleting an object, array or whatever take only 1 line of code), Most macros are bad, but those are really good.

: Restored post contents from history.


#4Vortez

Posted 04 April 2013 - 01:41 AM


#3Vortez

Posted 03 April 2013 - 09:59 AM

Just open the memory output pane, look at said location, then look what variable is allocated at this location. Might take some time but it work. Also, using those macros would really decrease your code size:

 

#define SAFE_RELEASE(x)           if((x) != NULL){(x)->Release();(x) = NULL;}
#define SAFE_DELETE_ARRAY(x)   if((x) != NULL){delete[] (x);(x) = NULL;}
#define SAFE_DELETE_OBJECT(x)  if((x) != NULL){delete (x);(x) = NULL;}
 

I don't understand why anybody use them anymore, they used to come with the directx sdk and are really awsome at saving space (deleting an object, array or whatever take only 1 line of code), Most macros are bad, but those are really good.


#2Vortez

Posted 03 April 2013 - 09:56 AM

Just open the memory output pane, look at said location, then look what variable is allocated at this location. Might take some time but it work. Also, using those macros would really decrease your code size:

 

#define SAFE_RELEASE(x)           if((x) != NULL){(x)->Release();(x) = NULL;}
#define SAFE_DELETE_ARRAY(x)   if((x) != NULL){delete[] (x);(x) = NULL;}
#define SAFE_DELETE_OBJECT(x)  if((x) != NULL){delete (x);(x) = NULL;}
 

I don't understand why anybody use them anymore, they used to come with the directx sdk and are really awsome at saving space (deleting an object, array or whatever take only 1 line of code)


#1Vortez

Posted 03 April 2013 - 09:54 AM

Just open the memory output pane, look at said location, then look what variable is allocated at this location. Might take some time but it work. Also, using those macros would really decrease your code size:

 

#define SAFE_RELEASE(x)           if((x) != NULL){(x)->Release();(x) = NULL;}
#define SAFE_DELETE_ARRAY(x)   if((x) != NULL){delete[] (x);(x) = NULL;}
#define SAFE_DELETE_OBJECT(x)  if((x) != NULL){delete (x);(x) = NULL;}
 


PARTNERS