public void Release(T obj) { if (m_stack.Count > 0 && ReferenceEquals(m_stack.Peek(), obj)) { PTThreadSafeLogger.LogError("Trying to destroy object that has already been released"); } m_stack.Push(obj); m_onRelease?.Invoke(obj); }
public static void LogError(object message) { PTThreadSafeLogger.LogError(message); }