This website requires JavaScript.
Explore
Help
Sign In
Lothario
/
axmol
mirror of
https://github.com/axmolengine/axmol.git
Watch
1
Star
0
Fork
You've already forked axmol
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
c5d5f3dd64
axmol
/
cocos
/
scripting
/
javascript
/
bindings
/
cocos2d_specifics.cpp.REMOV...
1 line
40 B
Plaintext
Raw
Normal View
History
Unescape
Escape
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-12 10:09:47 +08:00
5bc5339bd77792b57c97cebbe7dfd3b634038e38