<commit_before>module wd{
    export class LoaderFactory{
        public static create(type:EAssetType, extname:string) {
            var loader = null;

            switch (type){
                case EAssetType.FONT:
                    loader = FontLoader.getInstance();
                    break;
                case EAssetType.UNKNOW:
                    loader = this._getLoaderByExtname(extname);
                    break;
                default:
                    wdCb.Log.error(true, wdCb.Log.info.FUNC_UNKNOW(`asset type:${type}`));
                    break;
            }

            return loader;
        }

        public static createAllLoader():wdCb.Collection<Loader>{
            return wdCb.Collection.create<Loader>([JsLoader.getInstance(), GLSLLoader.getInstance(), TextureLoader.getInstance(), VideoLoader.getInstance(), FontLoader.getInstance(), FntLoader.getInstance()]);
        }

        private static _getLoaderByExtname(extname:string){
            var loader = null;

            switch (extname){
                case ".json":
                    loader = JSONLoader.getInstance();
                    break;
                case ".js":
                    loader = JsLoader.getInstance();
                    break;
                case ".glsl":
                    loader = GLSLLoader.getInstance();
                    break;
                case ".jpg":
                case ".jpeg":
                case ".png":
                case ".dds":
                case ".gif":
                case ".bmp":
                    loader = TextureLoader.getInstance();
                    break;
                case ".mp4":
                case ".ogv":
                case ".webm":
                    loader = VideoLoader.getInstance();
                    break;
                case ".ogg":
                case ".mp3":
                case ".wav":
                    loader = SoundLoader.getInstance();
                    break;
                case ".gltf":
                    loader = GLTFLoader.getInstance();
                    break;
                case ".wd":
                    loader = WDLoader.getInstance();
                    break;
                case ".eot":
                case ".ttf":
                case ".woff":
                case ".svg":
                    loader = FontLoader.getInstance();
                    break;
                case ".fnt":
                    loader = FntLoader.getInstance();
                    break;
                default:
                    Log.error(true, Log.info.FUNC_UNKNOW(`extname:${extname}`));
                    break;
            }

            return loader;
        }
    }
}
<commit_msg>fix loader->dispose<commit_after>module wd{
    export class LoaderFactory{
        public static create(type:EAssetType, extname:string) {
            var loader = null;

            switch (type){
                case EAssetType.FONT:
                    loader = FontLoader.getInstance();
                    break;
                case EAssetType.UNKNOW:
                    loader = this._getLoaderByExtname(extname);
                    break;
                default:
                    wdCb.Log.error(true, wdCb.Log.info.FUNC_UNKNOW(`asset type:${type}`));
                    break;
            }

            return loader;
        }

        public static createAllLoader():wdCb.Collection<Loader>{
            return wdCb.Collection.create<Loader>([JsLoader.getInstance(), GLSLLoader.getInstance(), WDLoader.getInstance(), TextureLoader.getInstance(), SoundLoader.getInstance(), VideoLoader.getInstance(), FontLoader.getInstance(), FntLoader.getInstance()]);
        }

        private static _getLoaderByExtname(extname:string){
            var loader = null;

            switch (extname){
                case ".json":
                    loader = JSONLoader.getInstance();
                    break;
                case ".js":
                    loader = JsLoader.getInstance();
                    break;
                case ".glsl":
                    loader = GLSLLoader.getInstance();
                    break;
                case ".jpg":
                case ".jpeg":
                case ".png":
                case ".dds":
                case ".gif":
                case ".bmp":
                    loader = TextureLoader.getInstance();
                    break;
                case ".mp4":
                case ".ogv":
                case ".webm":
                    loader = VideoLoader.getInstance();
                    break;
                case ".ogg":
                case ".mp3":
                case ".wav":
                    loader = SoundLoader.getInstance();
                    break;
                case ".gltf":
                    loader = GLTFLoader.getInstance();
                    break;
                case ".wd":
                    loader = WDLoader.getInstance();
                    break;
                case ".eot":
                case ".ttf":
                case ".woff":
                case ".svg":
                    loader = FontLoader.getInstance();
                    break;
                case ".fnt":
                    loader = FntLoader.getInstance();
                    break;
                default:
                    Log.error(true, Log.info.FUNC_UNKNOW(`extname:${extname}`));
                    break;
            }

            return loader;
        }
    }
}

{'fraction_non_alphanumeric': 0.10177558118250046, 'fraction_numerical': 0.0007321984257733846, 'mean_word_length': 1.018470631695604, 'pattern_counts': {'":': 44, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '487411', 'n_tokens_mistral': 1318, 'n_tokens_neox': 1206, 'n_words': 261}