I have some code that creates CMBlockBuffers and then creates a CMSampleBuffer and passes it to an AVAssetWriterInput. What's the deal on memory management here? According to the Apple documentation, anything you use with 'Create' in the name should be released with CFRelease . However, if I use CFRelease then my app aborts with 'malloc: * error for object 0xblahblah: pointer being freed was not allocated. CMBlockBufferRef tmp_bbuf = NULL; CMBlockBufferRef bbuf = NULL; CMSampleBufferRef sbuf = NULL; status = CMBlockBufferCreateWithMemoryBlock( kCFAllocatorDefault, samples, buflen,