moves macro definition to `ccConfig.h`

This commit is contained in:
Ricardo Quesada 2015-12-29 14:26:41 -08:00
parent 7cd80cb669
commit b92b67edad
3 changed files with 11 additions and 8 deletions

View File

@ -34,10 +34,6 @@ THE SOFTWARE.
NS_CC_BEGIN
// EXPERIMENTAL: Enable this in order to get rid of retain/release
// when using the Garbage Collector
#define CC_ENABLE_GC_FOR_NATIVE_OBJECTS 0
#if CC_REF_LEAK_DETECTION
static void trackRef(Ref* ref);
static void untrackRef(Ref* ref);

View File

@ -329,6 +329,17 @@ THE SOFTWARE.
#define CC_ENABLE_SCRIPT_BINDING 1
#endif
/** When CC_ENABLE_SCRIPT_BINDING and CC_ENABLE_GC_FOR_NATIVE_OBJECTS are both 1
then the Garbage collector will will release the native objects, only when the JS/Lua objets
are collected.
The benefit is that users don't need to retain/release the JS/Lua objects manually.
By default this behavior is disabled by default
*/
#ifndef CC_ENABLE_GC_FOR_NATIVE_OBJECTS
#define CC_ENABLE_GC_FOR_NATIVE_OBJECTS 0
#endif
/** @def CC_CONSTRUCTOR_ACCESS
* Indicate the init functions access modifier. If value equals to protected, then these functions are protected.
* If value equals to public, these functions are public,

View File

@ -76,10 +76,6 @@
#define BYTE_CODE_FILE_EXT ".jsc"
// EXPERIMENTAL: Enable this in order to get rid of retain/release
// when using the Garbage Collector
#define CC_ENABLE_GC_FOR_NATIVE_OBJECTS 0
using namespace cocos2d;
static std::string inData;