[Openmcl-devel] memory management and OpenGL trouble
Gary Byers
gb at clozure.com
Thu Sep 16 20:54:23 PDT 2010
I think that I found it.
The short version is that things like:
(make-instance 'ns:ns-opengl-view :with-frame rect :pixel-format pixel-format)
were sometimes doing:
(#/initWithFrame: (#/alloc ns:ns-opengl-view) rect)
instead of
(#/initWithFrame:pixelFormat: (#/alloc ...) rect pixel-format)
We should call the initfunction that matches the greatest number of initargs,
and ... well, the code that tries to determine that wasn't calculating 'max'
correctly.
That should be fixed in r14266.
On Thu, 16 Sep 2010, Raffael Cavallaro wrote:
>
> On Sep 16, 2010, at 10:43 PM, Gary Byers wrote:
>
>> A number of things in the bridge have changed in the last day or so,
>> many of them having to do with how MAKE-INSTANCE's initargs are used
>> to select and invoke an ObjC init method.
>
>
> I'd like to second that suspicion - one of the things I changed in my code to make it work again (apart from the aforementioned cocoa memory management) was to go from:
>
> (make-instance 'ns:ns-bitmap-image-rep :with-data data)
>
> to:
>
> (#/initWithData: (#/alloc ns:ns-bitmap-image-rep) data)
>
> or
>
> (#/imageRepWithData: ns:ns-bitmap-image-rep data)
>
> but this was before 1.6-dev-r14265M-trunk (so, 62, 63, or 64), and make-instance appears to be working properly again now in 65 (at least for the tests I just ran with ns-bitmap-image-rep and ns-data).
>
> warmest regards,
>
> Ralph
>
>
>
>
> Raffael Cavallaro
> raffaelcavallaro at me.com
>
>
>
>
>
>
More information about the Openmcl-devel
mailing list