I have been using SyphonQC plugin but now I want to change it and use the new-frame handler so I can manage frames more accurately.
changes in the function
– (void)setClientFromSearchHavingLock:(BOOL)isLocked
are….
//newClient = [[SyphonClient alloc] initWithServerDescription:[matches lastObject] options:nil newFrameHandler:nil];
newClient = [[SyphonClient alloc] initWithServerDescription:[matches lastObject] options:nil newFrameHandler:^(SyphonClient *client) {
CGLContextObj cgl_ctx = [_context CGLContextObj];
SyphonImage* image = [[client newFrameImageForContext:cgl_ctx] autorelease];
if(image)
[_frameQueue insertObject:image atIndex:0];
}];
This piece of code increases retain count of the “self” object so I am unable to release it on stopExecution function of the Plugin. I don’t know why is it happening despite trying to understand it several times 🙂
Thanks