File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,9 @@ if (APPLE OR CMAKE_SYSTEM MATCHES "Linux")
290290endif ()
291291
292292add_definitions (${NANOGUI_EXTRA_DEFS} )
293+ if (APPLE )
294+ add_definitions (-fobjc-arc)
295+ endif ()
293296
294297# Compile main NanoGUI library
295298add_library (nanogui-obj OBJECT
Original file line number Diff line number Diff line change 66std::string file_dialog(const std::vector<std::pair<std::string, std::string>> &filetypes, bool save) {
77 std::string path = " " ;
88 if (save) {
9- NSSavePanel *saveDlg = [[ NSSavePanel savePanel ] retain ];
9+ NSSavePanel *saveDlg = [NSSavePanel savePanel ];
1010
1111 NSMutableArray *types = [NSMutableArray new ];
1212 for (size_t idx = 0 ; idx < filetypes.size (); ++idx)
1717 if ([saveDlg runModal ] == NSModalResponseOK )
1818 path = [[[saveDlg URL ] path ] UTF8String ];
1919 } else {
20- NSOpenPanel *openDlg = [[ NSOpenPanel openPanel ] retain ];
20+ NSOpenPanel *openDlg = [NSOpenPanel openPanel ];
2121
2222 [openDlg setCanChooseFiles: YES ];
2323 [openDlg setCanChooseDirectories: NO ];
You can’t perform that action at this time.
0 commit comments