3d0c/gmf — pull request #10 by daozhao (2014-08-22 07:08:05+00:00)
Title: Like objective c manager

## Convert a way to manage cgo memory management, a bit like a [objective-c memory Management](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html) .
### If the function name contains a "New", you must use the Release function to release the object's memory space.

#### For example:
1.
videoEncCtx: = NewCodecCtx (codec) // function name contains "New" word.
defer Release (videoEncCtx) // you must use the Release function to release the object memory space.
2.
codec, err: = FindEncoder (AV_CODEC_ID_MPEG1VIDEO) // function name does not include "New", so you do not use the Release ()

### In the "chan" feature, before pushing into chan, need Retain object. Read objects from ”chan“, after use, you need to Release () to release the object memory space.

#### For example:
See example: encoding-multiple.go.