Commit Graph

17 Commits

Author SHA1 Message Date
Ricardo Quesada f4c68e4eef More renames of description() to getDescription() 2013-12-12 14:38:12 -08:00
minggo 1502fef7e4 use Schedule::performFunctionInCocosThread 2013-12-06 14:15:01 +08:00
minggo b67d567a79 replace long with int or ssize_t 2013-12-05 17:22:22 +08:00
minggo eded94ef76 don't create a pool, since it doesn't invoke any iOS dependent codes 2013-11-27 17:43:54 +08:00
minggo bcb131262c add helper funcion to invoke a function in gl thread 2013-11-27 16:49:07 +08:00
Ricardo Quesada be64dd97cf replaces `delete[]` with `free()` in C-based API
API that returns a newly allocated buffer as an output argument (not return value) are error-prone.

- Users forget to release the newly allocated buffer
- Or the call `delete` instead of `delete[]`

But some of those API need to call `realloc` on the buffer.
But `realloc` is only valid if the buffer was previously allocated with `malloc`.
If a buffer needs to be re-allocated using a C++ API, then `std::vector<char*>` should be used instead...

So, this patch does:

- Migrates the API from  `new []` / `delete[]` to  `malloc()` / `free()`
- Fixes all the memory issues: incorrect deallocs and memory leaks
- Updates the documentation
- And fixes misc issues with the API: removes `cc` from the ZipUtils class.
2013-11-11 18:09:47 -08:00
minggo d3cf36ba37 Merge pull request #4171 from dumganhar/jsb-64bit-fix
[ci skip]Jsb 64bit fix
2013-11-11 02:17:42 -08:00
James Chen 0151ac60ba fix 64bit warning. unsigned int (int) —> long. 2013-11-11 16:45:44 +08:00
Huabing.Xu dfcae4ed0d issue #3025: change TextureCache::purgeSharedTextureCache() and TextureCache::sharedTextureCache() to do not call deprecate function anymore 2013-11-11 16:04:34 +08:00
Huabing.Xu 3fc16256ab issue #3025: move deprecated texture cache implementation to cpp file 2013-11-11 15:40:12 +08:00
Huabing.Xu 02da3a29cc issue #3025: deprecate TextureCache::reloadAllTextures, call VolatileTextureMgr::reloadAllTextures instead 2013-11-11 11:38:02 +08:00
Huabing.Xu b726c6fd2c issue #3025: move VolatileTexture static function to VolatileTextureMgr 2013-11-08 16:47:33 +08:00
Huabing.Xu 935d472979 issue #3025: remove TextureCache::_sharedTextureCache 2013-11-08 11:36:27 +08:00
Huabing.Xu 99546cef46 issue #3025: add getTextureCache() in CCdirector() 2013-11-07 18:52:36 +08:00
Ricardo Quesada 84a6aa29cd Adds more 64-bit fixes
Replaces more `int` with `long` where it makes sense.

Also , it repalces some `unsigned long` with `long` for "lenght"
values as described in our c++ guideline
2013-11-05 17:36:44 -08:00
minggo 95acb1b9e3 issue #2905: helloworld build ok on android 2013-10-14 14:01:00 +08:00
minggo 49d7bbd600 issue #2905: remove sub folders except platform 2013-10-12 15:41:45 +08:00