์ด ํด๋ž˜์Šค๊ฐ€ ํ•˜๋Š” ํ–‰๋™์— ์‚ฌ์šฉ๋˜๋Š” ์™ธ๋ถ€ ํŒŒ์ผ์„ ์ƒ์„ฑ์ž์—์„œ ๊ฐ€์ ธ์˜ค๊ณ  ์ด ํŒŒ์ผ์ด ๋‹ฌ๋ผ์กŒ์„๋•Œ๋ฅผ ์œ„ํ•œ ์ดˆ๊ธฐํ™”๋ฅผ ์ด๋ ‡๊ฒŒ ์ธ์Šคํ„ด์Šค ์—†์• ์„œ ํ•ด๋„ ๋˜๋Š”์ง€ ๋ชจ๋ฅด๊ฒ ๋„ค


public static MyClass Instance => _instance ??= new MyClass();

private static MyClass? _instance;


public static void Destruct()

{

_instance = null;

}