Module: Shoes::Swt::Common::Remove

Included in:
ImagePattern
Defined in:
shoes-swt/lib/shoes/swt/common/remove.rb

Instance Method Summary collapse

Instance Method Details

#disposeObject

Classes should override to dispose of any Swt resources they create



20
21
# File 'shoes-swt/lib/shoes/swt/common/remove.rb', line 20

def dispose
end

#dispose_held_resourcesObject



15
16
17
# File 'shoes-swt/lib/shoes/swt/common/remove.rb', line 15

def dispose_held_resources
  color_factory&.dispose
end

#removeObject



7
8
9
10
11
12
13
# File 'shoes-swt/lib/shoes/swt/common/remove.rb', line 7

def remove
  app.remove_paint_listener(painter)
  remove_click_listeners
  real&.dispose unless real&.disposed?
  dispose_held_resources
  dispose
end