[Openmcl-devel] 0.13.2 and (require :cocoa-window) question

Gary Byers gb at clozure.com
Tue Jan 21 16:18:01 PST 2003



On Wed, 22 Jan 2003, Barry Perryman wrote:

> I looking at cocoa - both from within PB and OpenMCL - and I've been trying
> the example code. I can get (require :cocoa) to work fine, and I think that
> cocoa-window.lisp, might also contain a simple application, but when I try
> and run it, I get these problems:
>
> [ibook:~] barry% openmcl
> Welcome to OpenMCL Version (Beta: Darwin) 0.13.2!
> ? (require :cocoa-window)
> ;Loading #P"/usr/local/src/ccl/examples/cocoa-window.lisp"...
> ;Loading #P"/usr/local/src/ccl/examples/apple-objc.lisp"...
> "COCOA-WINDOW"
> ? (ccl::start-cocoa-application)
> 2003-01-21 23:54:15.959 dppccl[412] *** _NSAutoreleaseNoPool(): Object
> 0x37430 of class NSPathStore2 autoreleased with no pool in place - just
> leaking
> 2003-01-21 23:54:15.962 dppccl[412] *** _NSAutoreleaseNoPool(): Object
> 0x3eba0 of class NSCFDictionary autoreleased with no pool in place - just
> leaking
> .
> . } Many, many similar instances deleted
> .
> 0x5f1690 of class NSView autoreleased with no pool in place - just leaking
> 2003-01-21 23:54:16.449 dppccl[412] *** _NSAutoreleaseNoPool(): Object
> 0x5e5070 of class NSFlippableView autoreleased with no pool in place - just
> leaking
> > Error: ObjC class lispapplicationdelegate not found
> > While executing: CCL::LOOKUP-OBJC-CLASS
> > Type :POP to abort.
> Type :? for other options.
> 1 >
>
> What am I doing wrong?
>

Not necessarily anything; this should probably be modularized better
than it is.

In cocoa.lisp, there's a call:

(def-ccl-pointers create-autorelease-pool ()
  (create-autorelease-pool))

That'll create a "default" NSAutoReleasepool (sp?) object, which
is used to keep track of short-lived objects.

The short version of the story is that all of the messages are
complaining because that hasn't been done.

The longer version of the story is that we really don't want to
just let these short-lived objects collect in an autorelease-pool
forever, but the right solution may need to wait for native threads
(autorelease pools are (native-)thread-local, and odd things can
happen when non-native threads are involved.)

Back to the short version: if you create an autorelease pool before
creating any UI objects, the messages will be suppressed.


> Barry.
>
>
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel
>
>


_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel



More information about the Openmcl-devel mailing list