コード例 #1
0
 internal override void OnDispose(IntPtr nativePtr)
 {
     if (m_OnBeforeContextMenu != null)
     {
         m_OnBeforeContextMenu = null;
         CfxApi.ContextMenuHandler.cfx_context_menu_handler_set_callback(NativePtr, 0, IntPtr.Zero);
     }
     if (m_RunContextMenu != null)
     {
         m_RunContextMenu = null;
         CfxApi.ContextMenuHandler.cfx_context_menu_handler_set_callback(NativePtr, 1, IntPtr.Zero);
     }
     if (m_OnContextMenuCommand != null)
     {
         m_OnContextMenuCommand = null;
         CfxApi.ContextMenuHandler.cfx_context_menu_handler_set_callback(NativePtr, 2, IntPtr.Zero);
     }
     if (m_OnContextMenuDismissed != null)
     {
         m_OnContextMenuDismissed = null;
         CfxApi.ContextMenuHandler.cfx_context_menu_handler_set_callback(NativePtr, 3, IntPtr.Zero);
     }
     base.OnDispose(nativePtr);
 }
コード例 #2
0
 internal override void OnDispose(IntPtr nativePtr)
 {
     if(m_OnBeforeContextMenu != null) {
         m_OnBeforeContextMenu = null;
         CfxApi.cfx_context_menu_handler_set_managed_callback(NativePtr, 0, IntPtr.Zero);
     }
     if(m_RunContextMenu != null) {
         m_RunContextMenu = null;
         CfxApi.cfx_context_menu_handler_set_managed_callback(NativePtr, 1, IntPtr.Zero);
     }
     if(m_OnContextMenuCommand != null) {
         m_OnContextMenuCommand = null;
         CfxApi.cfx_context_menu_handler_set_managed_callback(NativePtr, 2, IntPtr.Zero);
     }
     if(m_OnContextMenuDismissed != null) {
         m_OnContextMenuDismissed = null;
         CfxApi.cfx_context_menu_handler_set_managed_callback(NativePtr, 3, IntPtr.Zero);
     }
     base.OnDispose(nativePtr);
 }