Home > Back-end >  BCB Pointers in how to release
BCB Pointers in how to release

Time:11-14

BCB Pointers in how to release

Examples are as follows:
TStringList * slPP=new TStringList;
SlPP - & gt; Add (... );
SlPP - & gt; Add (... );
.
SlPP - & gt; The Clear ();

When the released pointer instructions?

CodePudding user response:

The delete slPP.

CodePudding user response:

reference 1st floor QZJHJXJ response:
delete slPP.


Would you like slPP=NULL; Once, I check the information, say easily become wild pointer, let the system crash

CodePudding user response:

refer to the second floor LR_LULU response:
Quote: refer to 1st floor QZJHJXJ response:
delete slPP.


Would you like slPP=NULL; Once, I check the information, say easily become wild pointer, let the system crash

Delete your code later don't use, if you're afraid forgot misuse or secondary delete can assign a NULL,
  • Related