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

MacawView.doFindNode(location: CGPoint) causes a memory leak. #661

Closed
kunwang opened this issue Jan 13, 2020 · 2 comments
Closed

MacawView.doFindNode(location: CGPoint) causes a memory leak. #661

kunwang opened this issue Jan 13, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@kunwang
Copy link

kunwang commented Jan 13, 2020

Hi,
I find a memory leak when MacawView.doFindNode is invoked. It should invoke MGraphicsEndImageContext() before return doFindNode.

private func doFindNode(location: CGPoint) -> NodePath? {
    MGraphicsBeginImageContextWithOptions(self.bounds.size, false, 1.0)
    if let ctx = MGraphicsGetCurrentContext() {
        return doFindNode(location: location, ctx: ctx) // here should invoke MGraphicsEndImageContext() before return doFindNode
    }
    MGraphicsEndImageContext()
    return .none
 }
@amarunko
Copy link
Contributor

Hi, @kunwang, this issue already fixed in the master branch

@kunwang
Copy link
Author

kunwang commented Jan 15, 2020

Hi, @kunwang, this issue already fixed in the master branch

Ok, thanks.

@ystrot ystrot added the bug label Mar 26, 2020
@ystrot ystrot added this to the 0.9.6 milestone Mar 26, 2020
@ystrot ystrot closed this as completed Mar 26, 2020
@ystrot ystrot modified the milestones: 0.9.6, 0.9.7 Apr 10, 2020
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

3 participants