-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicated call of releasehook was fixed. #175
base: master
Are you sure you want to change the base?
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