0

I use simple split view controller in my osx application... split item 0 is used for menu and second one is for content (like in slack application).

I get memory leak, so need optimizations ... here is what I do when menu item is clicked:

partial void SettingsClicked (NSObject sender)
        {
                HighLightMenuItem (SETTINGS_INDEX);

                var svc = ParentViewController as NSSplitViewController;
                SettingsVC = SettingsVC ?? Storyboard?.InstantiateControllerWithIdentifier ("settingsViewController") as SettingsViewController;

                var svi = new NSSplitViewItem ();
                svi.ViewController = SettingsVC;

                DisableBack ();

                svc.RemoveSplitViewItem (svc.SplitViewItems [1]);
                svc.InsertSplitViewItem (svi, 1);

        }
Nininea
  • 2,671
  • 6
  • 31
  • 57
  • By memory leak, do you mean the object is not being released when you expect it to? – A O Nov 11 '16 at 18:13
  • Application stops running, without any message. Also , I do some profiling and allocated memory is too high – Nininea Nov 12 '16 at 15:36

0 Answers0