00001
00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00003 #pragma implementation
00004 #endif
00005
00006 #include "vil1_stream.h"
00007
00008 #include <vcl_cassert.h>
00009
00010 #define log_xtor 0
00011 #if log_xtor
00012 # include <vcl_iostream.h>
00013 #endif
00014
00015 vil1_stream::vil1_stream()
00016 {
00017 refcount_ = 0;
00018 #if log_xtor
00019 vcl_cerr << __FILE__ ", vil1_stream ctor : this = " << (void*)this << vcl_endl;
00020 #endif
00021 }
00022
00023 vil1_stream::~vil1_stream()
00024 {
00025 #if log_xtor
00026 vcl_cerr << __FILE__ ", vil1_stream dtor : this = " << (void*)this << vcl_endl;
00027 #endif
00028 }
00029
00030
00031 void vil1_stream::unref()
00032 {
00033 assert(refcount_ >= 0);
00034 if (--refcount_ == 0)
00035 delete this;
00036 }