home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20521 < prev    next >
Encoding:
Text File  |  1993-01-01  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!pageworks.com!world!siegel
  3. From: siegel@world.std.com (Rich Siegel)
  4. Subject: Re: "DisposePtr" routine in THINK Pascal
  5. Message-ID: <C074z8.J2I@world.std.com>
  6. Organization: GCC Technologies
  7. References: <1993Jan1.191132.13938@fcom.cc.utah.edu>
  8. Date: Fri, 1 Jan 1993 22:25:56 GMT
  9. Lines: 27
  10.  
  11. In article <1993Jan1.191132.13938@fcom.cc.utah.edu> Dmitry Boldyrev <dmitry@chemistry.chem.utah.edu> writes:
  12.  
  13. > DisposePtr(Ptr(AppPtr));    #debugger info: address of AppPtr is
  14. >0001D23A2 (OK)
  15. >end.            #debugger info: address of AppPtr is 0001D23A2 ?
  16. >        
  17. >I used standard THINK Pascal debugger..
  18. >
  19. >Why, after calling *DisposePtr* my address is  0001D23A2 ?
  20. >It can't be! The address must be 000000000 here !!!!
  21. >What does it mean ? *DisposePtr* do nothing here? or smth else ?
  22. >I'm always care about "memory" in my programs! 
  23. >Therefore I CAN'T CONTINUE MY PROJECT! Please, if anyone know what I'm
  24. >doing wrong, help!
  25.  
  26. DisposePtr doesn't zero the actual pointer itself; it just releases the
  27. block of memory that the pointer pointed to. You don't have to worry;
  28. the memory actually did get freed.
  29.  
  30. R.
  31.  
  32.  
  33. -- 
  34. -----------------------------------------------------------------------
  35. Rich Siegel                              Internet: siegel@world.std.com
  36. Senior Software Engineer
  37. GCC Technologies
  38.