         @emit 'open scope', {order:0}
         @released = yes
 
+    delete: () =>
+        @order.removeAllListeners()
+        @order.reset()
+        @order.clear()
+        delete @parent
+        delete @order
 
 
 class StreamAdapter extends Stream # Readable

{ prettify, attrStr } = require './util'

EVENTS = [
    'add', 'close', 'end'
    'attr','text', 'raw', 'data'
]


                @closed?()
                @closed = yes

    onremove: (el) ->
        el._stream.delete()
        delete el._stream

    onclose: (el) ->
        el._stream.write =>
            unless el.isempty or el is el.builder
