Mercurial > hg > octave-lyh
diff liboctave/Array.h @ 12125:a21a3875ca83
implement a common class for reference counts
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 20 Jan 2011 11:10:27 +0100 |
parents | 12df7854fa7c |
children | 43cc49c7abd1 |
line wrap: on
line diff
--- a/liboctave/Array.h +++ b/liboctave/Array.h @@ -39,6 +39,7 @@ #include "oct-sort.h" #include "quit.h" #include "oct-mem.h" +#include "oct-refcount.h" // One dimensional array class. Handles the reference counting for // all the derived classes. @@ -59,7 +60,7 @@ T *data; octave_idx_type len; - int count; + octave_refcount<int> count; ArrayRep (T *d, octave_idx_type l) : data (no_ctor_new<T> (l)), len (l), count (1)