Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Trygve Inda
>> >> I would think that even with a retain it could get weird... >> >> The main thread wants to use the imageRef property so it calls: >> >> myRef = [window.imageRef]; >> [myref retain]; >> >> If right between these calls, the worker thread calls setImageRef (on a >> property with atomic,

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Roland King
> > I would think that even with a retain it could get weird... > > The main thread wants to use the imageRef property so it calls: > > myRef = [window.imageRef]; > [myref retain]; > > If right between these calls, the worker thread calls setImageRef (on a > property with atomic, copy), then

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Trygve Inda
> >> On 27 Jul 2016, at 12:05 PM, Trygve Inda wrote: >> >> How is it retained by the main thread without an explicit retain call? >> >> I would be no different than a main thread calling: >> >> someVar [[MyObj alloc] init] >> [someVar doSomething]; >> >> If a worker

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Trygve Inda
> >> On 27 Jul 2016, at 10:05, Trygve Inda wrote: >> >>> >> >> How is it retained by the main thread without an explicit retain call? > > are you not using ARC? If you are then all such references, both variable and > during method calls are retained automatically.

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Roland King
> On 27 Jul 2016, at 10:05, Trygve Inda wrote: > >> > > How is it retained by the main thread without an explicit retain call? are you not using ARC? If you are then all such references, both variable and during method calls are retained automatically. If you’re

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Graham Cox
> On 27 Jul 2016, at 12:18 PM, Graham Cox wrote: > > The atomic setter method probably looks something like this: A further thought. If the getter method is also protected, like: - (NSImageRep*) imageRep { @synchronized( self ) { return

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Graham Cox
> On 27 Jul 2016, at 12:05 PM, Trygve Inda wrote: > > How is it retained by the main thread without an explicit retain call? > > I would be no different than a main thread calling: > > someVar [[MyObj alloc] init] > [someVar doSomething]; > > If a worker thread were

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Trygve Inda
> >> On 27 Jul 2016, at 09:33, Trygve Inda wrote: >> >> >> >> If the worker thread calls window.imageRep = myResult; it is possible that >> the main thread is in the middle of a call like: >> >> [[window.imageRep] >>

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Roland King
> On 27 Jul 2016, at 09:33, Trygve Inda wrote: > > > > If the worker thread calls window.imageRep = myResult; it is possible that > the main thread is in the middle of a call like: > > [[window.imageRep] >

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Trygve Inda
> e.g. > > worker thread: > > while( self.running ) > { > // do work > > window.imageRep = myResult; // window.imageRep is (atomic, copy) > > [performOnMainThread: window.setNeedsDisplay]; // this is obviously > pseudocode! > } > > > main thread, when it needs to terminate worker

Re: Codesign assumes folder structure, fails.

2016-07-26 Thread Greg Parker
> On Jul 25, 2016, at 6:15 PM, Graham Cox wrote: > > Hi all, > > I’m getting an error from codesign when it tries to sign a third-party > embedded framework. > > The error is: > >