void he_free (DB_fileinfo_t *_info) { he_info_t *info = (he_info_t *)_info; if (info) { if (info->psf2fs) { psf2fs_delete( info->psf2fs ); info->psf2fs = NULL; } if (info->emu) { free (info->emu); info->emu = NULL; } if (info->path) { free (info->path); info->path = NULL; } free (info); } }
void AopsfWrapper::close() noexcept { if (this->psf2fs != nullptr) { psf2fs_delete(this->psf2fs); } if (this->psfHandle != nullptr) { if (this->psfVersion == 2) { psf2_stop(this->psfHandle); } else { psf_stop(this->psfHandle); } delete[] reinterpret_cast<unsigned char *>(this->psfHandle); this->psfHandle = nullptr; } this->first = true; }