From: Patrick G. <par...@gm...> - 2009-07-06 16:03:32
|
> Sorry to repost, but this has become a real blocker for me - I thought > I'd try one last time before giving up and re-coding in ObjC. > > I can't persuade RubyCocoa to CFRelease a CGImageSourceRef without a > bus error - as a result my PDF writing code is leaking like a sieve. Try adding some GC code, keeping references and nulling them after release. GC.disable imageSource = CGImageSourceCreateWithURL(NSURL.fileURLWithPath('testdata/pot pourri/ blood.jpg'), nil) image = CGImageSourceCreateImageAtIndex(imageSource, 0, nil) CFRelease image CFRelease imageSource image = imageSource = nil GC.enable GC.start Try that for each iteration, and if it works you might want to do it only each 10 or 100 iterations. On another note, I had a GC problem with a QCView being collected early even though it was retained by its parent view. Adding it as an instance variable to a class solved the problem. -Patrick |