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.
24 lines
538 B
24 lines
538 B
using System; |
|
using gaemstone.ECS; |
|
|
|
namespace Immersion; |
|
|
|
[Module] |
|
public partial class ManagedComponentTest |
|
{ |
|
[Component] |
|
public class BigManagedData |
|
{ |
|
public readonly byte[] BigArray = new byte[1024 * 1024]; |
|
} |
|
|
|
[System] |
|
public static void CreateLotsOfGarbageData(World world) |
|
{ |
|
var game = world.LookupByPathOrThrow("/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); |
|
} |
|
}
|
|
|