コード例 #1
0
ファイル: controller.cpp プロジェクト: Reemjd/genius
void Controller::exitRequested()
{
  deleteVariables();
  deleteHotkeys();
  Resources::tempFolder.remove();
  exit(0);
}
コード例 #2
0
ファイル: environment.cpp プロジェクト: Tushar1313/qucs_cvs
/* Very alike the copy constructor the function copies the content of
   the given environment into the calling environment. */
void environment::copy (const environment & e) {
  if (name) free (name);
  name = e.name ? strdup (e.name) : NULL;
  deleteVariables ();
  copyVariables (e.root);
  solvee = e.solvee;
  checkee = e.checkee;
  defs = e.defs;
  delete children;
  iscopy = true;
  children = new ptrlist<environment>;
}
コード例 #3
0
ファイル: environment.cpp プロジェクト: Tushar1313/qucs_cvs
// Destructor deletes the environment object.
environment::~environment () {
  if (name) free (name);
  deleteVariables ();
  // delete solver and checker if this is not just a reference
  if (!iscopy) {
    if (solvee)
      delete solvee;
    if (checkee) {
      checkee->setEquations (NULL);
      delete checkee;
    }
  }
  // delete children
  for (ptrlistiterator<environment> it (*children); *it; ++it) {
    delete (*it);
  }
  delete children;
}
コード例 #4
0
ファイル: datafile.c プロジェクト: brltty/brltty
static VariableNestingLevel *
getBaseDataVariables (void) {
  if (baseDataVariables) {
    releaseVariableNestingLevel(currentDataVariables);
    deleteVariables(baseDataVariables);
  } else {
    VariableNestingLevel *globalVariables = getGlobalVariables(1);
    if (!globalVariables) return NULL;

    VariableNestingLevel *baseVariables = newVariableNestingLevel(globalVariables, "base");
    if (!baseVariables) return NULL;

    baseDataVariables = claimVariableNestingLevel(baseVariables);
  }

  currentDataVariables = claimVariableNestingLevel(baseDataVariables);
  return baseDataVariables;
}
コード例 #5
0
ファイル: controller.cpp プロジェクト: Reemjd/genius
Controller::~Controller()
{
  Resources::tempFolder.remove();
  deleteVariables();
  deleteHotkeys();
}