From: Scott T. <ea...@ma...> - 2009-07-06 19:23:14
|
>CFRelease imageSource results in a segfault or bus error. For low >iteration counts this happens after the test has finished, increasing >the count makes it happen during the loop, suggesting a problem during >garbage collection I think. > >If I don't CFRelease imageSource then I run out of memory to load any >more images after about 4000 iterations with my test file. > >Does anyone have any ideas please? It does sound like a problems somewhere in the garbage collector. It seems like the garbage collector is trying to keep the reference that rightfully belongs to you. Have you tried taking out your calls to CFRelease and forcing the garbage collector to run every iteration through the loop as a test (say by calling GC.garbage_collect). Seems a bit extreme, but it would let you know if the ruby proxy wants to "own" your CG objects for you. |