× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



<snip>
Assuming that myField_P is the based of myField, does these two
statements yield same result?
 
Statement 1 ==>   dealloc myField_P;
 
Statement 2 ==>   myField_P = *null; 

</snip>

No, statement 2 sets the value of the pointer to null but does not
deallocate the storage. It's possible that the OS would generate a
runtime error if you tried but I have never tried. You could prove by
going into a loop, allocating a block or storage and then moving in
null. At some point, the program is going to crash because it is out of
heap storage. 

Statement one deallocates the storage and set the pointer to null. 



------------------------------


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.