X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=libcds%2Fsrc%2Fstatic_sequence%2Fwt_coder.cpp;h=4735ee5a6b168794fff292c9a17d7c9e1a822270;hb=1413ae2197d87e87571c9d8d6fc9f20f691fcea3;hp=147e939ce3ba38eda820274da74e5e6c29e7c2af;hpb=450ba3c9c74665094fb8f6821d6cc92d2bf23011;p=SXSI%2FXMLTree.git diff --git a/libcds/src/static_sequence/wt_coder.cpp b/libcds/src/static_sequence/wt_coder.cpp index 147e939..4735ee5 100644 --- a/libcds/src/static_sequence/wt_coder.cpp +++ b/libcds/src/static_sequence/wt_coder.cpp @@ -21,6 +21,19 @@ #include +wt_coder::wt_coder() { + user_count=0; +} + +void wt_coder::use() { + user_count++; +} + +void wt_coder::unuse() { + user_count--; + if(user_count==0) delete this; +} + wt_coder * wt_coder::load(FILE *fp) { uint rd; if(fread(&rd,sizeof(uint),1,fp)!=1) return NULL;