You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
588 B
26 lines
588 B
using System; |
|
using gaemstone; |
|
using gaemstone.ECS; |
|
using gaemstone.ECS.Utility; |
|
|
|
namespace Immersion; |
|
|
|
[Module] |
|
public partial class ManagedComponentTest |
|
{ |
|
[Component] |
|
public class BigManagedData |
|
{ |
|
public readonly byte[] BigArray = new byte[1024 * 1024]; |
|
} |
|
|
|
[System] |
|
public static void CreateLotsOfGarbageData<T>(World<T> world) |
|
{ |
|
var game = world.LookupPathOrThrow("/Game"); |
|
game.Remove<BigManagedData>(); |
|
game.Set(new BigManagedData()); |
|
// This is to make sure the number of objects kept alive stays stable. |
|
Console.WriteLine(ReferenceHandle.NumActiveHandles); |
|
} |
|
}
|
|
|