Menu () { if (ourAppMenu == null) { ourAppMenu = new Menu(); // returns retained pointer long nsMenu = nativeGetAppMenu(); ourAppMenu.nativePeer = ourAppMenu.nativeAttachMenu(nsMenu); ourAppMenu.isInHierarchy = true; } return ourAppMenu; }