From b52aa61eb3edb55ef581782ee64504f87fe960a3 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Mon, 12 Dec 2022 04:26:34 +0700 Subject: [PATCH] Add finalizer to `UserID` class --- sources/Users/UserID.uc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sources/Users/UserID.uc b/sources/Users/UserID.uc index 97e90a2..0667199 100644 --- a/sources/Users/UserID.uc +++ b/sources/Users/UserID.uc @@ -1,6 +1,6 @@ /** * Acedia's class for storing user's ID. - * Copyright 2020-2021 Anton Tarasenko + * Copyright 2020-2022 Anton Tarasenko *------------------------------------------------------------------------------ * This file is part of Acedia. * @@ -45,6 +45,17 @@ var protected SteamID initializedData; // after `initialized` is set to `true`. var protected bool initialized; +protected function Finalizer() +{ + initialized = false; + _.memory.Free(initializedData.steamID64); + initializedData.steamID64 = none; + initializedData.accountType = 0; + initializedData.universe = 0; + initializedData.instance = 0; + initializedData.steamID32 = 0; +} + // Given a number in form of array (`digits`) of it's digits // (425327 <-> [4, 2, 5, 3, 2, 7]) // return given number mod 2 and