def destroy(self): """Destroy the event loop""" if self._ptr is not None: for event_source in self.event_sources: event_source.remove() # destroy the pointer and remove the destructor ffi.release(self._ptr) self._ptr = None
def _destroy(self): """Frees the pointer associated with the Proxy""" if self._ptr is not None: if self._display._ptr is not None: ffi.release(self._ptr) else: self._ptr = ffi.gc(self._ptr, None) self._ptr = None
def destroy(self) -> None: """Destroy Wayland display object. This function emits the :class:`Display` destroy signal, releases all the sockets added to this display, free's all the globals associated with this display, free's memory of additional shared memory formats and destroy the display object. .. seealso:: :meth:`Display.add_destroy_listener()` """ if self._ptr is not None: ffi.release(self._ptr) self._ptr = None
def disconnect(self) -> None: """Close a connection to a Wayland display Close the connection to display and free all resources associated with it. """ if self._ptr: # we need to be sure the event queues and proxies are destroyed # before we disconnect the client for obj in self._children: if not obj.destroyed: obj.destroy() # run destructor and remove it ffi.release(self._ptr) self._ptr = None
def destroy(self) -> None: """Destroy an event queue Destroy the given event queue. Any pending event on that queue is discarded. The wl_display object used to create the queue should not be destroyed until all event queues created with it are destroyed with this function. """ if self._ptr is not None and self._display is not None: ffi.release(self._ptr) # delete the pointer and the reference to the display self._ptr = None self._display = None
def destroy(self): """Destroy the client""" if self._ptr is not None: ffi.release(self._ptr) self._ptr = None self._display = None