Ticket #133 (closed defect: fixed)
cocoa bridge leaks NSString instances when converting lisp strings to NSStrings
| Reported by: | rme | Owned by: | gb |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Foreign Function Interface | Version: | 1.1 |
| Keywords: | Cc: |
Description
(We already know this, but might as well put it on a ticket to annoy and shame us.)
The Cocoa bridge tries to be helpful by turning lisp strings into NSStrings when passing them to methods that expect an Objective-C object. These strings are never released.
Just as an initial thought, suppose we put these NSString instances into an nsstring-wrapper class. We could then keep these wrappers in a weak-key hash table (using the lisp string as the key), and use OpenMCL's termination mechanism to arrange for the NSString to be released before the nsstring-wrapper value gets it in the neck from the GC.
Change History
Note: See
TracTickets for help on using
tickets.
