File tree Expand file tree Collapse file tree
Helpers/Plugin Architecture Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -331,8 +331,6 @@ - (void)applicationWillTerminate:(NSNotification *)note
331331#ifdef TEXTUAL_BUILT_WITH_ICLOUD_SUPPORT
332332 [sharedCloudManager () closeCloudSyncSession ];
333333#endif
334-
335- [RZUserDefaults () synchronize ];
336334}
337335
338336- (BOOL )applicationShouldHandleReopen : (NSApplication *)sender hasVisibleWindows : (BOOL )flag
Original file line number Diff line number Diff line change 5151
5252- (void )loadBundle : (NSBundle *)bundle ;
5353
54+ - (void )sendDealloc ;
55+
5456- (NSView *)pluginPreferenesPaneView ;
5557- (NSString *)pluginPreferencesPaneMenuItemName ;
5658@end
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ - (void)loadBundle:(NSBundle *)bundle
220220 }
221221}
222222
223- - (void )dealloc
223+ - (void )sendDealloc
224224{
225225 BOOL supportsOldFeature = [self .primaryClass respondsToSelector: @selector (pluginUnloadedFromMemory )];
226226 BOOL supportsNewFeature = [self .primaryClass respondsToSelector: @selector (pluginWillBeUnloadedFromMemory )];
Original file line number Diff line number Diff line change @@ -138,14 +138,11 @@ - (void)loadPlugins
138138- (void )unloadPlugins
139139{
140140 TXPerformBlockSynchronouslyOnQueue (self.dispatchQueue , ^{
141- self.allLoadedPlugins = nil ;
142-
143- for (NSBundle *bundle in self.allLoadedBundles ) {
144- if ([bundle isLoaded ]) {
145- [bundle unload ];
146- }
141+ for (THOPluginItem *plugin in self.allLoadedPlugins ) {
142+ [plugin sendDealloc ];
147143 }
148144
145+ self.allLoadedPlugins = nil ;
149146 self.allLoadedBundles = nil ;
150147 });
151148}
You can’t perform that action at this time.
0 commit comments