TCopyParamList::~TCopyParamList() { Clear(); SAFE_DESTROY(FCopyParams); SAFE_DESTROY(FRules); SAFE_DESTROY(FNames); SAFE_DESTROY(FNameList); }
~TSessionActionRecord() { SAFE_DESTROY(FErrorMessages); SAFE_DESTROY(FNames); SAFE_DESTROY(FValues); SAFE_DESTROY(FFileList); SAFE_DESTROY(FFile); }
void Restart() { FState = Opened; FRecursive = false; SAFE_DESTROY(FErrorMessages); SAFE_DESTROY(FFileList); SAFE_DESTROY(FFile); FNames->Clear(); FValues->Clear(); }
void twilight_path_destroy(TwilightPath *pTwilightPath) { if (pTwilightPath != 0) { SAFE_DESTROY(gpath, pTwilightPath->pPath); SAFE_DESTROY(gbitmap, pTwilightPath->pBmpGrey); free(pTwilightPath); } return; } /* end of twilight_path_destroy */
TActionLog::~TActionLog() { DebugAssert(FPendingActions->GetCount() == 0); SAFE_DESTROY(FPendingActions); FClosed = true; ReflectSettings(); DebugAssert(FLogger == nullptr); }
void File(TRemoteFile * AFile) { if (FFile != nullptr) { SAFE_DESTROY(FFile); } FFile = AFile->Duplicate(true); }
void TCopyParamList::Change(intptr_t Index, const UnicodeString & Name, TCopyParamType * CopyParam, TCopyParamRule * Rule) { if ((Name != GetName(Index)) || !CompareItem(Index, CopyParam, Rule)) { FNames->SetString(Index, Name); delete GetCopyParam(Index); FCopyParams->SetItem(Index, CopyParam); delete GetRule(Index); FRules->SetItem(Index, Rule); Modify(); } else { SAFE_DESTROY(CopyParam); SAFE_DESTROY(Rule); } }
void DeleteConfiguration() { static bool ConfigurationDeleted = false; if (!ConfigurationDeleted) { TConfiguration * Conf = GetConfiguration(); SAFE_DESTROY(Conf); ConfigurationDeleted = true; } }
long reg_close_winscp_key(HKEY Key) { assert(GetConfiguration() != nullptr); THierarchicalStorage * Storage = reinterpret_cast<THierarchicalStorage *>(Key); if (Storage != nullptr) { SAFE_DESTROY(Storage); } return ERROR_SUCCESS; }
//--------------------------------------------------------------------------- BOOL DllProcessDetach() { assert(Processes); Processes--; if (!Processes) { assert(FarPlugin); SAFE_DESTROY(FarPlugin); TermExtensionModule(); } return TRUE; }
void ResourceManager::Destroy() { SAFE_DESTROY(s_playerSprite); SAFE_DESTROY(s_enemyOneSprite); SAFE_DESTROY(s_enemyOneAltSprite); SAFE_DESTROY(s_enemyTwoSprite); SAFE_DESTROY(s_enemyTwoAltSprite); SAFE_DESTROY(s_rocketSprite); SAFE_DESTROY(s_bombSprite); }
//--------------------------------------------------------------------- __fastcall TLocationProfilesDialog::~TLocationProfilesDialog() { SAFE_DESTROY(FSharedScrollOnDragOver); SAFE_DESTROY(FSessionScrollOnDragOver); SAFE_DESTROY(FSharedBookmarkList); SAFE_DESTROY(FSessionBookmarkList); SAFE_DESTROY(FSharedFolders); SAFE_DESTROY(FSessionFolders); }
void ExtException::AddMoreMessages(const Exception * E) { if (E != nullptr) { if (FMoreMessages == nullptr) { FMoreMessages = new TStringList(); } const ExtException * ExtE = dyn_cast<ExtException>(E); if (ExtE != nullptr) { if (ExtE->GetMoreMessages() != nullptr) { FMoreMessages->Assign(ExtE->GetMoreMessages()); } } UnicodeString Msg; ExceptionMessageFormatted(E, Msg); // new exception does not have own message, this is in fact duplication of // the exception data, but the exception class may being changed if (Message.IsEmpty()) { Message = Msg; } else if (!Msg.IsEmpty()) { FMoreMessages->Insert(0, UnformatMessage(Msg)); } if (IsInternalException(E)) { AppendExceptionStackTraceAndForget(FMoreMessages); } if (FMoreMessages->GetCount() == 0) { SAFE_DESTROY(FMoreMessages); } } }
void CoreFinalize() { try { GetConfiguration()->Save(); } catch (Exception & E) { ShowExtendedException(&E); } NeonFinalize(); #ifndef NO_FILEZILLA TFileZillaIntf::Finalize(); #endif PuttyFinalize(); SAFE_DESTROY(StoredSessions); DeleteConfiguration(); CryptographyFinalize(); WinFinalize(); }
ExtException::~ExtException() noexcept { SAFE_DESTROY(FMoreMessages); FMoreMessages = nullptr; }
TFarConfiguration::~TFarConfiguration() { SAFE_DESTROY(FBookmarks); }
//--------------------------------------------------------------------------- void __fastcall TSynchronizeController::StartStop(TObject * Sender, bool Start, const TSynchronizeParamType & Params, const TCopyParamType & CopyParam, TSynchronizeOptions * Options, TSynchronizeAbortEvent OnAbort, TSynchronizeThreadsEvent OnSynchronizeThreads, TSynchronizeLog OnSynchronizeLog) { if (Start) { Configuration->Usage->Inc(L"KeepUpToDates"); try { assert(OnSynchronizeLog != NULL); FSynchronizeLog = OnSynchronizeLog; FOptions = Options; if (FLAGSET(Params.Options, soSynchronize) && (FOnSynchronize != NULL)) { FOnSynchronize(this, Params.LocalDirectory, Params.RemoteDirectory, CopyParam, Params, NULL, FOptions, true); } FCopyParam = CopyParam; FSynchronizeParams = Params; assert(OnAbort); FSynchronizeAbort = OnAbort; if (FLAGSET(FSynchronizeParams.Options, soRecurse)) { SynchronizeLog(slScan, FMTLOAD(SYNCHRONIZE_SCAN, (FSynchronizeParams.LocalDirectory))); } FSynchronizeMonitor = new TDiscMonitor(dynamic_cast<TComponent*>(Sender)); FSynchronizeMonitor->SubTree = false; TMonitorFilters Filters; Filters << moFilename << moLastWrite; if (FLAGSET(FSynchronizeParams.Options, soRecurse)) { Filters << moDirName; } FSynchronizeMonitor->Filters = Filters; FSynchronizeMonitor->MaxDirectories = 0; FSynchronizeMonitor->ChangeDelay = GUIConfiguration->KeepUpToDateChangeDelay; FSynchronizeMonitor->OnTooManyDirectories = SynchronizeTooManyDirectories; FSynchronizeMonitor->OnDirectoriesChange = SynchronizeDirectoriesChange; FSynchronizeMonitor->OnFilter = SynchronizeFilter; FSynchronizeMonitor->AddDirectory(FSynchronizeParams.LocalDirectory, FLAGSET(FSynchronizeParams.Options, soRecurse)); FSynchronizeMonitor->OnChange = SynchronizeChange; FSynchronizeMonitor->OnInvalid = SynchronizeInvalid; FSynchronizeMonitor->OnSynchronize = OnSynchronizeThreads; // get count before open to avoid thread issues int Directories = FSynchronizeMonitor->Directories->Count; FSynchronizeMonitor->Open(); SynchronizeLog(slStart, FMTLOAD(SYNCHRONIZE_START, (Directories))); } catch(...) { SAFE_DESTROY(FSynchronizeMonitor); throw; } } else { FOptions = NULL; SAFE_DESTROY(FSynchronizeMonitor); } }
ExtException::~ExtException() noexcept { SAFE_DESTROY(FMoreMessages); }
void TCopyParamList::Reset() { SAFE_DESTROY(FNameList); FModified = false; }
TRegistryStorage::~TRegistryStorage() { SAFE_DESTROY(FRegistry); }
THierarchicalStorage::~THierarchicalStorage() { SAFE_DESTROY(FKeyHistory); }
//--------------------------------------------------------------------------- void __fastcall TTerminalManager::DestroyInstance() { assert(FInstance); SAFE_DESTROY(FInstance); }
//--------------------------------------------------------------------------- __fastcall TBookmarks::~TBookmarks() { Clear(); SAFE_DESTROY(FBookmarkLists); }
void TCopyParamList::Modify() { SAFE_DESTROY(FNameList); FModified = true; }