well, first make sure that [closebang] does get called. e.g. start Pd with "-stderr" and print something to stderr.
Thanks, [closebang] is not called here (ubuntu, pd-extended ppa). It's
only called when destroying an abstraction, but not when using Ctrl+w
or Ctrl+q.