wbyoung

Whitney Young is a developer at FadingRed
 

Previously I wrote about Core Animation and Garbage Collection and pointed out a bug when using the two together.

This appears to be fixed on 10.6.

If you’re still using 10.5, one way to fix the problem is the following code in your custom view:

- (void)viewWillMoveToWindow:(NSWindow *)newWindow {
    [[NSGarbageCollector defaultCollector] collectExhaustively];
}

This will block the currently executing thread to do garbage collection, so it’s not an ideal solution, but it works.

  1. kuon09reblog reblogged this from do-nothing
  2. do-nothing reblogged this from wbyoung
  3. wbyoung posted this