Backport changes from the grammar branch
[SXSI/XMLTree.git] / libcds / src / static_sequence / wt_coder.cpp
index 147e939..4735ee5 100644 (file)
  
 #include <wt_coder.h>
 
+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;