Delete the underlying C++ instance after exec returns Otherwise, rb_gc_call_finalizer_at_exit() can delete stuff that Qt::Application still needs for its cleanup.
Source Code
# File qt/qtruby4.rb, line 240 def exec method_missing(:exec) self.dispose Qt::Internal.application_terminated = true end
<code/>and<pre/>for code samples.