Permalink
Browse files

Fuck NSBundle

  • Loading branch information...
emsquared committed Jul 8, 2014
1 parent 12a5a1d commit f218b6444cefae56576c3cef0ca40b977713604a
@@ -331,8 +331,6 @@ - (void)applicationWillTerminate:(NSNotification *)note
#ifdef TEXTUAL_BUILT_WITH_ICLOUD_SUPPORT
[sharedCloudManager() closeCloudSyncSession];
#endif
[RZUserDefaults() synchronize];
}
- (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag
@@ -51,6 +51,8 @@
- (void)loadBundle:(NSBundle *)bundle;
- (void)sendDealloc;
- (NSView *)pluginPreferenesPaneView;
- (NSString *)pluginPreferencesPaneMenuItemName;
@end
@@ -220,7 +220,7 @@ - (void)loadBundle:(NSBundle *)bundle
}
}
- (void)dealloc
- (void)sendDealloc
{
BOOL supportsOldFeature = [self.primaryClass respondsToSelector:@selector(pluginUnloadedFromMemory)];
BOOL supportsNewFeature = [self.primaryClass respondsToSelector:@selector(pluginWillBeUnloadedFromMemory)];
@@ -138,14 +138,11 @@ - (void)loadPlugins
- (void)unloadPlugins
{
TXPerformBlockSynchronouslyOnQueue(self.dispatchQueue, ^{
self.allLoadedPlugins = nil;
for (NSBundle *bundle in self.allLoadedBundles) {
if ([bundle isLoaded]) {
[bundle unload];
}
for (THOPluginItem *plugin in self.allLoadedPlugins) {
[plugin sendDealloc];
}
self.allLoadedPlugins = nil;
self.allLoadedBundles = nil;
});
}

0 comments on commit f218b64

Please sign in to comment.