class Scene_Base
def dispose_all_windows
instance_variables.each do |varname|
ivar = instance_variable_get(varname)
ivar.dispose if ivar.is_a?(Window)
ivar.dispose if ivar.is_a?(Bitmap)
ivar.dispose if ivar.is_a?(Sprite)
end