On Wed, Mar 12, 2008 at 3:56 PM, Jonas Maebe <[EMAIL PROTECTED]> wrote: > Aren't you going to have problems with memory leaks with these wrapper > instances? Suppose you create an instance in Pascal code, then pass > the (wrapped) Objective-C class instance to an Objective-C method > which releases it -> how will the Pascal wrapper instance ever be > released?
I don't know any example of a method in Cocoa which may or not release the class depending on something. If it surely frees the class, then you can set MyObject.Handle to nil before freeing it. Else there exists no problem. I'm building a nice way to create Cocoa apps in Pascal, not a generic object-oriented objective-c bridge. The main aim is creating a Lazarus-Cocoa widgetset, and maybe adding some Cocoa to the LCL-Carbon widgetset to get TTrayIcon implemented. I personally consider my bindings good enougth to be used to create pure Cocoa applications, but I have no need to develop Cocoa specific applications. -- Felipe Monteiro de Carvalho _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal