Skip to content
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

FIXME need release of blocks #51

Open
eichert12 opened this issue Sep 14, 2016 · 1 comment
Open

FIXME need release of blocks #51

eichert12 opened this issue Sep 14, 2016 · 1 comment
Labels

Comments

@eichert12
Copy link
Contributor

There are various places in the code where blocks are used where we have comments that say "FIXME need release...."

block = rb_retain(block); // FIXME need release...

What is the fix for this? What implication does this not being fixed have?

@Watson1978 can you provide any guidance?

@Watson1978
Copy link
Member

rb_retain(block) retains the block object.
The object will be used later when block method will be called by some event.
So, we have to keep the block object by using rb_retain(block) which will call [block retain]; in Objective-C land.

If rb_retain(block) causes increasing memory usage, we have to release the object by rb_release().

@Watson1978 Watson1978 added the Leak label Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants