Commit Graph

11 Commits

Author SHA1 Message Date
James Chen e509a52551 Small fix for `FREE` wrong variable. 2013-12-28 14:38:13 +08:00
James Chen b17117a1a1 More warning fixes. 2013-12-28 14:34:52 +08:00
James Chen 142b189305 Some warning fixes. 2013-12-25 16:06:39 +08:00
byeonggee.seo e673bd80bb new spine runtime applied 2013-12-19 10:50:37 +09:00
Ricardo Quesada 10eafeaeed fixes warning compiler 2013-12-17 11:16:30 -08:00
minggo 1e9c763b40 use ssize_t for index and capacity 2013-12-12 14:48:26 +08:00
minggo b67d567a79 replace long with int or ssize_t 2013-12-05 17:22:22 +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
boyu0 6c1144ee79 issue #2770: fix some warning 2013-11-11 12:49:38 +08:00
minggo 6fc2be62f5 issue #2905: testcpp bild ok on Android 2013-10-15 18:00:03 +08:00
minggo 4313c46e93 issue #2905:adjust folder structure 2013-10-12 11:22:05 +08:00