// ------------------------------------------------------------------------
// Copyright (c) 2021-2026, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ------------------------------------------------------------------------
namespace Engine.Core.Abstraction
{
///
/// Interface for managed objects that wrap native objects.
///
public interface IManagedObject
{
///
/// Gets the underlying native object.
///
public object NativeObject { get; }
///
/// Gets a value indicating whether the underlying native object has been disposed.
///
public bool IsNativeObjectDisposed { get; }
///
/// Destroys the native object associated with this managed object.
///
public void Destroy();
///
/// Determines whether the specified managed object is equal to the current managed object.
///
public bool Equals(IManagedObject other)
{
if (other == null) return false;
else return NativeObject == other.NativeObject;
}
}
}