Browse Source

Add finalizer to `UserID` class

pull/8/head
Anton Tarasenko 2 years ago
parent
commit
b52aa61eb3
  1. 13
      sources/Users/UserID.uc

13
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

Loading…
Cancel
Save