Duplicated call of releasehook was fixed.#175
Duplicated call of releasehook was fixed.#175baldale wants to merge 6 commits intoalbertodemichelis:masterfrom
Conversation
|
Hello Alexey ! |
|
Hi. The adding of redundant referece occures at line below //FIXME comment: #include <squirrel.h> #ifdef SQUNICODE SQInteger quit(HSQUIRRELVM v) void printfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...) void errorfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...) HSQUIRRELVM global_vm; class Callback class Mock int test_mock_destructor(SQUserPointer pointer, SQInteger size) int callback_destructor(SQUserPointer pointer, SQInteger size) } int test_mock_constructor(HSQUIRRELVM vm) } int callback_constructor(HSQUIRRELVM vm) int test_mock_get_name(HSQUIRRELVM vm) void register_class_test_mock(HSQUIRRELVM vm) } void register_class_callback(HSQUIRRELVM vm) } void test_case(HSQUIRRELVM vm) } int main(int argc, char* argv[]) } |
|
Any concernes about this fix? |
|
I followed the references for |
It seems that GetRefCount method breaks read semantics. Since it will add reference to object in case it missing.
I have recived this problem when called this method after my native class was destructed .
Thi method added reference into RefTable and relase hoook was called second time => I'v got dupliucated delition of my object.
So it seems it shouldn't add reference during call