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

BSText 会内存泄漏 #13

Open
privatestring opened this issue Jun 23, 2020 · 5 comments
Open

BSText 会内存泄漏 #13

privatestring opened this issue Jun 23, 2020 · 5 comments

Comments

@privatestring
Copy link

No description provided.

@a1049145827
Copy link
Owner

感谢提醒,我会排查一下

@johnil
Copy link

johnil commented Mar 27, 2023

public class func remove(_ target: TextDebugTarget?) { 
    sharedDebugLock.wait()
    sharedDebugTargets.addObject(target)
    sharedDebugLock.signal()
}

DebugOption的释放部分错误代码引起了内存泄露,remove的时机也有问题。周知。

sharedDebugTargets.addObject(target)

TextDebugOption.remove(self)

@a1049145827
Copy link
Owner

好的,感谢

@a1049145827
Copy link
Owner

我看这个代码确实是有错误,但是应该不会导致内存泄露,因为这个NSPointerArray 里的对象是 Unsafe Unretain 的

@myouzh
Copy link

myouzh commented Nov 23, 2023

确实有内存泄漏,是不是别的地方导致的呢?大佬帮忙维护解决一下吧

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

No branches or pull requests

4 participants