home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / hypercar / 3258 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  1.2 KB

  1. Xref: sparky comp.sys.mac.hypercard:3258 comp.sys.mac.programmer:14554
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!netnews.upenn.edu!msuinfo!uchinews!ellis!cjh1
  3. From: cjh1@ellis.uchicago.edu (chi ju huang)
  4. Newsgroups: comp.sys.mac.hypercard,comp.sys.mac.programmer
  5. Subject: Memory deallocation for the return value of XFCN
  6. Message-ID: <1992Aug26.140820.1765@midway.uchicago.edu>
  7. Date: 26 Aug 92 14:08:20 GMT
  8. Sender: news@uchinews.uchicago.edu (News System)
  9. Reply-To: cjh1@midway.uchicago.edu
  10. Organization: University of Chicago Computing Organizations
  11. Lines: 18
  12.  
  13. Hello, folks,
  14.  
  15. Here is a question about writing XFCNs.
  16. (Pardon me, if it is a frequently asked one :-)
  17.  
  18. To return a value through XFCNs, returnValue in the XCmdBlock is assigned
  19. a handle to the (pointer of) result string. To allocate memory to store
  20. the result, NewHandle() must be used. However, it seems to me that the
  21. allocated space can never get a chance to be freed, therefore, after
  22. many executions of XFCNs, the memory would be used up.
  23.  
  24. Do I miss something here? (so it's not a problem at all, I hope :-)
  25. -OR-
  26. If that's the reality, can I get around with it?
  27.  
  28. Thanks in advance for any hint and help.
  29.  
  30. -- cjh        cjh1@ellis.uchicago.edu
  31.