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

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!spool.mu.edu!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!quadra.chem.utah.edu!dmitry
  3. From: Dmitry Boldyrev <dmitry@chemistry.chem.utah.edu>
  4. Subject: "DisposePtr" routine in THINK Pascal
  5. Message-ID: <1993Jan1.191132.13938@fcom.cc.utah.edu>
  6. X-Xxmessage-Id: <A58760FFC301C4C9@quadra.chem.utah.edu>
  7. X-Xxdate: Wed, 1 Jan 92 09:13:51 GMT
  8. Sender: news@fcom.cc.utah.edu
  9. Organization: University of Utah
  10. X-Useragent: Nuntius v1.1.1d16
  11. Date: Fri, 1 Jan 93 19:11:32 GMT
  12. Lines: 28
  13.  
  14. Hello,
  15. I figured out very strange thing in THINK Pascal 4.0.1:
  16. I've placed one fragment from my program:
  17. var
  18.     AppPtr: IntegerPtr;
  19. begin                                    #debugger info: address of AppPtr is 000000000
  20.  AppPtr := IntegerPtr(NewPtrClear(2));    #debugger info: address of AppPtr
  21. is 0001D23A2 (OK)
  22.  AppPtr^ := 327;                        #debugger info: address of AppPtr is 0001D23A2 (OK)
  23.  SetPtrSize(Ptr(AppPtr), 4);            #debugger info: address of AppPtr is
  24. 0001D23A2 (OK)
  25.  
  26.  DisposePtr(Ptr(AppPtr));                #debugger info: address of AppPtr is
  27. 0001D23A2 (OK)
  28. end.                                    #debugger info: address of AppPtr is 0001D23A2 ?
  29.         
  30. I used standard THINK Pascal debugger..
  31.  
  32. Why, after calling *DisposePtr* my address is  0001D23A2 ?
  33. It can't be! The address must be 000000000 here !!!!
  34. What does it mean ? *DisposePtr* do nothing here? or smth else ?
  35. I'm always care about "memory" in my programs! 
  36. Therefore I CAN'T CONTINUE MY PROJECT! Please, if anyone know what I'm
  37. doing
  38. wrong, help!
  39. Thank you!
  40. Internet: dmitry@chemistry.chem.utah.edu.
  41. = Dmitry =
  42.