[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disposing of pointers




   Date: Thu, 25 Apr 91 12:51:09 PDT
   From: walker@nova.rdd.lmsc.lockheed.com ( Scott Walker)

	   From info-mcl-request@cambridge.apple.com Thu Apr 25 10:39:47 1991
	   To: eliot@clarity.princeton.edu
	   Subject: Re: disposing of pointers
	   Cc: info-mcl@cambridge.apple.com

	   >Can someone tell me how to dispose of a pointer? I'm making 
	   >bitmaps using make-bitmap in quickdraw.lisp and can't seem to be able to
	   >get rid of them afterwords.

	   Here's example 
	   of how to:
	    (setf tmp-bmap (make-bitmap 0 0 10 10))
	   ...
	    (dispose-record tmp-bmap :bitmap)
	    (setf tmp-bmap nil) ; important to nil lisp var holding  pointer 
				; since ptr meaningless now & could lead to
				;crashes during GC

   what if MACL decides to do a GC after the dispose-record but before 
   the (setf tmp-bmap nil)?????  Can someone tell me WHY there is
   no window of vulnerability here?

There is in 1.x.  There isn't in 2.0, because in 2.0 mac pointers are
tagged explicitly, so the GC knows about them.

   -andrew