Ejemplo n.º 1
0
/*public virtual*/
morkEnv::~morkEnv() /*i*/ // assert CloseEnv() executed earlier
{
  CloseMorkNode(mMorkEnv);
  if (mEnv_Heap)
  {
    mork_bool ownsHeap = mEnv_OwnsHeap;
    nsIMdbHeap*saveHeap = mEnv_Heap;

    if (ownsHeap)
    {
#ifdef MORK_DEBUG_HEAP_STATS
      printf("%d blocks remaining \n", ((orkinHeap *) saveHeap)->HeapBlockCount());
      mork_u4* array = (mork_u4*) this;
      array -= 3;
      // null out heap ptr in mem block so we won't crash trying to use it to
      // delete the env.
      *array = nullptr;
#endif // MORK_DEBUG_HEAP_STATS
      // whoops, this is our heap - hmm. Can't delete it, or not allocate env's from
      // an orkinHeap.
      delete saveHeap;
    }

  }
//  MORK_ASSERT(mEnv_SelfAsMdbEnv==0);
  MORK_ASSERT(mEnv_ErrorHook==0);
}
Ejemplo n.º 2
0
/*public virtual*/
morkTable::~morkTable() /*i*/ // assert CloseTable() executed earlier
{
  CloseMorkNode(mMorkEnv);
  MORK_ASSERT(this->IsShutNode());
  MORK_ASSERT(mTable_Store==0);
  MORK_ASSERT(mTable_RowSpace==0);
}
Ejemplo n.º 3
0
mdb_err morkNode::CloseMdbObject(morkEnv *ev)
{
  // if only one ref, Handle_CutStrongRef will clean up better.
  if (mNode_Uses == 1)
    return CutStrongRef(ev);

  mdb_err outErr = 0;
  
  if ( IsNode() && IsOpenNode() )
  {
    if ( ev )
    {
      CloseMorkNode(ev);
      outErr = ev->AsErr();
    }
  }
  return outErr;
}
Ejemplo n.º 4
0
/*public virtual*/
morkRowCellCursor::~morkRowCellCursor() // CloseRowCellCursor() executed earlier
{
  CloseMorkNode(mMorkEnv);
  MORK_ASSERT(this->IsShutNode());
}
/*public virtual*/
morkPortTableCursor::~morkPortTableCursor() // ClosePortTableCursor() executed earlier
{
  CloseMorkNode(mMorkEnv);
}
Ejemplo n.º 6
0
/*public virtual*/
morkObject::~morkObject() // assert CloseObject() executed earlier
{
  if (!IsShutNode())
    CloseMorkNode(this->mMorkEnv);
  MORK_ASSERT(mObject_Handle==0);
}
/*public virtual*/
morkTableRowCursor::~morkTableRowCursor()  // CloseTableRowCursor() executed
                                           // earlier
{
  CloseMorkNode(mMorkEnv);
  MORK_ASSERT(this->IsShutNode());
}