lib/volt/reactive/events.rb
# Removes the listener from where ever it was created.
Removes the listener from where ever it was created.
Removes the listener from where ever it was created .
def remove
    if @removed
      puts "event #{@event} already removed"
      return
    end
    if DEBUG && RUBY_PLATFORM == 'opal'
      @@all_events.delete(self) if @@all_events
      `window.total_listeners -= 1;`
      `console.log("Rem", window.total_listeners);`
    end
    @removed = true
    @klass.remove_listener(@event, self)
    @scope_provider = nil
    @callback = nil
    @klass = nil
  end
def remove if @removed puts "event #{@event} already removed" return end if DEBUG && RUBY_PLATFORM == 'opal' @@all_events . delete ( self ) if @@all_events ` window.total_listeners -= 1; ` ` console.log("Rem", window.total_listeners); ` end @removed = true @klass . remove_listener ( @event , self ) @scope_provider = nil @callback = nil @klass = nil end
Removes the listener from where ever it was created.
Removes the listener from where ever it was created .
# raise "event #{@event} already removed" # We need to clear these references to free the memory # @klass2 = @klass # @event = nil