Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/rabbit/command/rabbit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ def run(arguments)
end
end
exit_code = application.run
application.windows.each(&:destroy)
application.unref
::Rabbit.destroy_application

exit_code.zero?
end
Expand Down
7 changes: 7 additions & 0 deletions lib/rabbit/rabbit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ def application
[:non_unique, :handles_command_line])
end

def destroy_application
return if @@application.nil?
@@application.windows.each(&:destroy)
@@application.unref
@@application = nil
end

def logger
@@logger ||= Logger.default
end
Expand Down