Beispiel #1
0
 void initialize(size_t esize, int length) {
   assert(length >= 0, "illegal length");
   assert(_data == NULL, "must be new object");
   _length  = length;
   _data    = resource_allocate_bytes(esize * length);
   DEBUG_ONLY(init_nesting();)
 }
 ResourceArray(size_t esize, int length) {
   assert(length >= 0, "illegal length");
   _length  = length;
   _data    = resource_allocate_bytes(esize * length);
   DEBUG_ONLY(init_nesting();)
 }
 // creation
 ResourceArray() {
   _length  = 0;
   _data    = NULL;
   DEBUG_ONLY(init_nesting();)
 }
Beispiel #4
0
 // creation
 ResourceArray() {
   _length  = 0;
   _data    = NULL;
   DEBUG_ONLY(init_nesting();)
   // client may call initialize, at most once
 }