Okay, so I’ve been getting the ‘modifying layer that is being finalized’ error message when i’m trying to release a subview from a superview:

[self.popupPreviewView release];
self.popupPreviewView = nil;

The best way to solve this (that I’ve found – please post a comment if you can provide a better one) is to remove the view from it’s superview rather than release it:

[self.popupPreviewView removeFromSuperview];
self.popupPreviewView = nil;