Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!hookup!swrinde!cs.utexas.edu!math.ohio-state.edu!scipio.cyberstore.ca!nntp.cs.ubc.ca!magellan!whui
From: whui@mprgate.mpr.ca (William Hui)
Subject: VW & C interface - memory mgmt
Message-ID: <1995Feb22.231850.16148@mprgate.mpr.ca>
Sender: news@mprgate.mpr.ca
Organization: MPR Teltech Ltd., Burnaby, BC., Canada
X-Newsreader: Tin 1.1 PL3
Date: Wed, 22 Feb 1995 23:18:50 GMT
Lines: 26

Hi all,

I have a question about VW 1.0 & C interface (running on AIX):
What we have is ST calls a C function which does a malloc (~2 or 3 K)
on a character pointer, processes it and returns the character pointer
back to ST. When I inspect the return, it was an instance of
ISO8859L1String. Therefore, I believe I'm not able to free the return.

My question is: 
- Is this a memory leak?
  - If so, how can I free it? Free it on the Smalltalk side? or C side?
    - If I free it, would ObjectMemory also try to garbage-collect the
      string? Thus causing segment violation?? (We are having core
      dumps.)

Thanks in advance for any help.

Will

--
[ William L.M. Hui                     Voice: (604) 293-6085           ]
[ MPR Teltech Ltd., BC, CANADA         Email: whui@mpr.ca    |         ]
[ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  --+--  <<<< ]
[ This is God's grace --- Jesus Christ, who saves us from    |         ]
[ our own sin.   "Amazing grace, how sweet the sound ..."    |         ]
----- http://Ursaminor.SCS.Carleton.CA/COOP/Students/whui/whui.html ----
