Fixes memory leak on setResourcePath

Thanks Xcode -> Analize
Fixes issue with latest Xcode and compiling for release mode
Merge pull request #2 from ricardoquesada/fix_memory_leak

Fixes memory leak on setResourcePath