Replies: 1 comment
-
|
possible. if you happen to figure out some solution to that, don't hesitate to open PR |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello ✋
I played with the sample app and edit it a bit. I embed a
STTextViewin a newNSWindowthat I can open from a first one. I've addedNeonPluginandSTAnnotationPluginto thisSTTextView.After closing this window,
STTextViewis still in memory (through the Xcode memory graph). Which I don't have when I disable the plugins.I suppose there is a retain cycle with plugin usage as
STTextViewhold a reference toSTPlugin(through aPlugin). ThisPlugingets a reference to aSTPluginEventstoo. But thisSTPluginEventshold closures that referenceSTPluginCoordinatorContext(which directly containsSTTextView) & also direcltySTTextViewin case of NeonPlugin and STAnnotationPlugin this create a retain cycle.tearDownthat stands indeinitofSTTextViewseems then to never being called for me to get a chance to break the retain cycle manually, so I quickly (and dirty) tried to add aviewWillMove(toWindow:)as a workaround inSTTextViewto call thetearDownmanually and it indeed breaks the retain cycle and free up the memory after closing my window.May be I'm not using the plugins as I should though 🤷♂️. Did you notice the same behavior too ?
Beta Was this translation helpful? Give feedback.
All reactions