GLib.Source.prototype.destroy

function destroy(): void {
    // Gjs wrapper for g_source_destroy()
}
  

Removes a source from its GLib.MainContext, if any, and mark it as destroyed. The source cannot be subsequently added to another context. It is safe to call this on sources which have already been removed from their context.