projects
/
SXSI
/
XMLTree.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed error in last commit
[SXSI/XMLTree.git]
/
libcds
/
src
/
static_sequence
/
wt_coder.cpp
diff --git
a/libcds/src/static_sequence/wt_coder.cpp
b/libcds/src/static_sequence/wt_coder.cpp
index
147e939
..
4735ee5
100644
(file)
--- a/
libcds/src/static_sequence/wt_coder.cpp
+++ b/
libcds/src/static_sequence/wt_coder.cpp
@@
-21,6
+21,19
@@
#include <wt_coder.h>
#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;
wt_coder * wt_coder::load(FILE *fp) {
uint rd;
if(fread(&rd,sizeof(uint),1,fp)!=1) return NULL;