Skip to content

Conversation

@LeonidVas
Copy link
Collaborator

If symbols from the dynamic library are loaded into the
global namespace (ffi.C), by invoke ffi.load() with global
is true and without save the return value, it may be
garbage collected. For correct work the return value
must be saved.
Example - tarantool/tarantool#4999
So, use a new C library namespace instead the global one.
This will help to keep the global namespace clean and
avoid the problem with garbage collection.

@LeonidVas LeonidVas requested a review from Totktonada May 19, 2020 22:29
@LeonidVas LeonidVas self-assigned this May 19, 2020
If symbols from the dynamic library are loaded into the
global namespace (ffi.C), by invoke ffi.load() with global
is true and without save the return value, it may be
garbage collected. For correct work the return value
must be saved.
Example - tarantool/tarantool#4999
So, use a new C library namespace instead the global one.
This will help to keep the global namespace clean and
avoid the problem with garbage collection.
@LeonidVas LeonidVas force-pushed the lvasilev/gh-no-ticket-fix-so-load branch from 0fd9828 to aded02d Compare June 1, 2020 19:54
Copy link
Contributor

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Totktonada Totktonada merged commit 62a557f into master Jun 1, 2020
@Totktonada Totktonada deleted the lvasilev/gh-no-ticket-fix-so-load branch June 1, 2020 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants