[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: firstname.lastname@example.org
- Subject: Usefull Refcon
- From: Andrew L. M. Shalit <alms>
- Date: Tue, 14 Aug 90 19:04:18 -0400
- Cc: info-macl
- In-reply-to: Blake Meike's message of Tue, 14 Aug 90 17:36:28 -0400 <9008142136.AA19095@world.std.com>
From: email@example.com (Blake Meike)
I'd like to be able to find the lisp object that belongs to some
of the Mac 'objects' I have floating around my program. A standard
technique is to put the 'name' of the lisp object into the refcon
of the Mac 'object'. But how do I convince lisp that the value that
I get out of the refcon is really an object.
This is a very unsafe thing to do. If a GC happens, your object
will move and the address in the refcon will not be updated.
The only safe way I can think of to do what you want is to keep
a hash table mapping integers to objects. Then you can put the
integers in the refcon.