コード例 #1
0
 protected override void ReleaseWaylandObject()
 {
     if (SharedMemory != null)
     {
         SharedMemory.Dispose();
         SharedMemory = null;
     }
     if (Shell != null)
     {
         Shell.Dispose();
         Shell = null;
     }
     if (Seat != null)
     {
         Seat.Dispose();
         Seat = null;
     }
     if (Compositor != null)
     {
         Compositor.Dispose();
         Compositor = null;
     }
 }
コード例 #2
0
 /// <summary>
 /// Handle the registry removing something.
 /// </summary>
 /// <param name="data"></param>
 /// <param name="registry"></param>
 /// <param name="id"></param>
 void OnRegistryRemove(IntPtr data, IntPtr registry, uint id)
 {
     if (Compositor != null && registry == Compositor.Handle)
     {
         Compositor.Dispose();
         Compositor = null;
     }
     if (SharedMemory != null && registry == SharedMemory.Handle)
     {
         SharedMemory.Dispose();
         SharedMemory = null;
     }
     if (Shell != null && registry == Shell.Handle)
     {
         Shell.Dispose();
         Shell = null;
     }
     if (Seat != null && registry == Seat.Handle)
     {
         Seat.Dispose();
         Seat = null;
     }
 }