vendor/kinetic-v5.1.0.js
function() {
           var children = Kinetic.Collection.toCollection(this.children);
            var child;
            for (var i = 0; i < children.length; i++) {
                child = children[i];
                // reset parent to prevent many _setChildrenIndices calls
                delete child.parent;
                child.index = 0;
                child.destroy();
            }
            children = null;
            this.children = new Kinetic.Collection();
            return this;
        }
function() {
           var children = Kinetic.Collection.toCollection(this.children);
            var child;
            for (var i = 0; i < children.length; i++) {
                child = children[i];
                // reset parent to prevent many _setChildrenIndices calls
                delete child.parent;
                child.index = 0;
                child.destroy();
            }
            children = null;
            this.children = new Kinetic.Collection();
            return this;
        }
function ( ) { var children = Kinetic . Collection . toCollection ( this . children ) ; var child ; for ( var i = 0 ; i < children . length ; i ++ ) { child = children [ i ] ; // reset parent to prevent many _setChildrenIndices calls delete child . parent ; child . index = 0 ; child . destroy ( ) ; } children = null ; this . children = new Kinetic . Collection ( ) ; return this ; }
destroy all children
@method
@memberof Kinetic.Container.prototype
destroy all children