+ if (write_source) {
+ if (write_source->removable()) {
+ /* this is a "stub" write source which exists in the
+ Session source list, but is removable. We must emit
+ a drop references call because it should not
+ continue to exist. If we do not do this, then the
+ Session retains a reference to it, it is not
+ deleted, and later attempts to create a new source
+ file will use wierd naming because it already
+ exists.
+
+ XXX longer term TO-DO: do not add to session source
+ list until we write to the source.
+ */
+ write_source->drop_references ();
+ }
+ }
+