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