This commit is contained in:
peterino2 2026-01-02 16:47:56 -08:00
parent 17b3a4c23d
commit a06b0e6394
12 changed files with 107 additions and 92 deletions

View File

@ -1,17 +1,16 @@
pub const ConfigRegistry = struct { pub const ConfigRegistry = struct {
pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.ConfigRegistry"); pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.ConfigRegistry");
allocator: std.mem.Allocator, allocator: std.mem.Allocator = undefined,
configMap: ?ConfigMap = null, configMap: ?ConfigMap = null,
pub fn create(allocator: std.mem.Allocator) !*@This() { pub fn create(self: *@This(), allocator: std.mem.Allocator, first: bool) !void {
const self = try allocator.create(@This()); if (!first)
return;
self.* = .{ self.* = .{
.allocator = allocator, .allocator = allocator,
}; };
return self;
} }
// by convention this should be in the root // by convention this should be in the root
@ -42,7 +41,6 @@ pub const ConfigRegistry = struct {
if (self.configMap) |*map| { if (self.configMap) |*map| {
map.deinit(); map.deinit();
} }
self.allocator.destroy(self);
} }
}; };

View File

@ -8,21 +8,22 @@ pub const ConsoleCommand = struct {
pub const Console = struct { pub const Console = struct {
pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.Console"); pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.Console");
allocator: std.mem.Allocator, allocator: std.mem.Allocator = undefined,
arena: std.heap.ArenaAllocator, arena: std.heap.ArenaAllocator = undefined,
commandMap: std.StringHashMapUnmanaged(ConsoleCommand) = .{}, commandMap: std.StringHashMapUnmanaged(ConsoleCommand) = .{},
pub fn create(allocator: std.mem.Allocator) !*@This() { pub fn create(self: *@This(), allocator: std.mem.Allocator, first: bool) !void {
const self = try allocator.create(@This()); if (!first) {
return;
}
self.* = .{ self.* = .{
.arena = std.heap.ArenaAllocator.init(allocator), .arena = std.heap.ArenaAllocator.init(allocator),
.allocator = allocator, .allocator = allocator,
}; };
core.engine_logs("console system created"); core.engine_logs("console system created");
return self;
} }
pub fn addConsoleCommand(self: *@This(), funcName: []const u8, func: ConsoleFunc) !void { pub fn addConsoleCommand(self: *@This(), funcName: []const u8, func: ConsoleFunc) !void {
@ -59,7 +60,6 @@ pub const Console = struct {
pub fn destroy(self: *@This()) void { pub fn destroy(self: *@This()) void {
self.arena.deinit(); self.arena.deinit();
self.commandMap.deinit(self.allocator); self.commandMap.deinit(self.allocator);
self.allocator.destroy(self);
} }
}; };

View File

@ -29,6 +29,8 @@ pub const debugLine = debug_draw.debugLine;
pub const engineTime = @import("engineTime.zig"); pub const engineTime = @import("engineTime.zig");
pub const engineObject = @import("engineObject.zig"); pub const engineObject = @import("engineObject.zig");
pub const EngineObjectOpts = engineObject.EngineObjectOpts;
pub const ObjectOpts = engineObject.EngineObjectOpts;
pub const EngineObjectVTable = engineObject.EngineObjectVTable; pub const EngineObjectVTable = engineObject.EngineObjectVTable;
pub const MakeTypeName = engineObject.MakeTypeName; pub const MakeTypeName = engineObject.MakeTypeName;
pub const PatchStruct = engineObject.PatchStruct; pub const PatchStruct = engineObject.PatchStruct;

View File

@ -210,15 +210,15 @@ pub const EcsRegistry = struct {
pub var NeonObjectTable = core.EngineObjectVTable.from(@This(), "core.EcsRegistry"); pub var NeonObjectTable = core.EngineObjectVTable.from(@This(), "core.EcsRegistry");
pub fn init(allocator: std.mem.Allocator) !*@This() { pub fn init(self: *@This(), allocator: std.mem.Allocator, first: bool) !void {
const self = try allocator.create(@This()); if (!first) {
return;
}
self.* = .{ self.* = .{
.allocator = allocator, .allocator = allocator,
.baseSet = BaseSet.init(allocator), .baseSet = BaseSet.init(allocator),
}; };
return self;
} }
pub fn registerContainer(self: *@This(), ref: EcsContainerRef, _containerName: core.Name) !void { pub fn registerContainer(self: *@This(), ref: EcsContainerRef, _containerName: core.Name) !void {
@ -279,7 +279,7 @@ pub const EcsRegistry = struct {
} }
pub fn deinit(self: *@This()) void { pub fn deinit(self: *@This()) void {
self.destroy(); _ = self;
} }
pub fn destroy(self: *@This()) void { pub fn destroy(self: *@This()) void {
@ -300,7 +300,6 @@ pub const EcsRegistry = struct {
self.containers.deinit(self.allocator); self.containers.deinit(self.allocator);
self.containerNames.deinit(self.allocator); self.containerNames.deinit(self.allocator);
self.containersByName.deinit(self.allocator); self.containersByName.deinit(self.allocator);
self.allocator.destroy(self);
} }
}; };

View File

@ -5,6 +5,7 @@ const time = @import("engineTime.zig");
const core = @import("core.zig"); const core = @import("core.zig");
const jobs = @import("jobs.zig"); const jobs = @import("jobs.zig");
const math = @import("math.zig"); const math = @import("math.zig");
const builtin = @import("builtin");
const pscopes = core.algorithm.pscopes; const pscopes = core.algorithm.pscopes;
const tracy = @import("tracy").t; const tracy = @import("tracy").t;
@ -129,9 +130,7 @@ pub const Engine = struct {
var i: i32 = @intCast(self.destroyListCore.items.len - 1); var i: i32 = @intCast(self.destroyListCore.items.len - 1);
while (i >= 0) : (i -= 1) { while (i >= 0) : (i -= 1) {
const item = self.destroyListCore.items[@as(usize, @intCast(i))]; const item = self.destroyListCore.items[@as(usize, @intCast(i))];
if (item.vtable.deinit_func) |deinitFn| { self.destroyObject(item);
deinitFn(item.ptr);
}
} }
} }
self.destroyListCore.deinit(self.allocator); self.destroyListCore.deinit(self.allocator);
@ -162,6 +161,10 @@ pub const Engine = struct {
return @ptrCast(@alignCast(rv)); return @ptrCast(@alignCast(rv));
} }
const DebugSlack = struct {
slack: [1024 * 16]u8 align(16) = undefined,
};
// creates an engine object using the engine's allocator. // creates an engine object using the engine's allocator.
pub fn createObjectVTable(self: *@This(), vtable: *core.EngineObjectVTable, params: NeonObjectParams) !*anyopaque { pub fn createObjectVTable(self: *@This(), vtable: *core.EngineObjectVTable, params: NeonObjectParams) !*anyopaque {
if (self.createObjectLock) { if (self.createObjectLock) {
@ -173,7 +176,17 @@ pub const Engine = struct {
self.createObjectLock = true; self.createObjectLock = true;
defer self.createObjectLock = false; defer self.createObjectLock = false;
const newIndex = self.engineObjects.items.len; const newIndex = self.engineObjects.items.len;
const newObjectPtr = try vtable.init_func(self.allocator); // call this thing with the special allocator that adds vtable. slackSize to it. var newObjectPtr: *anyopaque = undefined; //self.allocator.create(DebugSlack);
if (comptime core.BuildOption("static_build")) {
newObjectPtr = @ptrCast(@alignCast((try self.allocator.alignedAlloc(u8, .@"16", vtable.typeSize))));
} else {
newObjectPtr = @ptrCast(@alignCast(&(try self.allocator.create(DebugSlack)).slack));
}
try vtable.init_func(newObjectPtr, self.allocator, true);
// try vtable.init_func(self.allocator); // call this thing with the special allocator that adds vtable. slackSize to it.
const newObjectRef = EngineObjectRef{ const newObjectRef = EngineObjectRef{
.ptr = @as(*anyopaque, @ptrCast(newObjectPtr)), .ptr = @as(*anyopaque, @ptrCast(newObjectPtr)),
@ -359,14 +372,28 @@ pub const Engine = struct {
self.destroyDependents(); self.destroyDependents();
} }
fn destroyObject(self: *@This(), item: EngineObjectRef) void {
if (item.vtable.deinit_func) |deinitFn| {
deinitFn(item.ptr);
}
if (comptime core.BuildOption("static_build")) {
var slice: []u8 = undefined;
slice.ptr = @ptrCast(@alignCast(item.ptr));
slice.len = item.vtable.typeSize;
self.allocator.rawFree(slice, .@"16", @returnAddress());
} else {
const asStruct: *DebugSlack = @ptrCast(@alignCast(item.ptr));
self.allocator.destroy(asStruct);
}
}
fn destroyDependents(self: *@This()) void { fn destroyDependents(self: *@This()) void {
if (self.destroyListSimple.items.len > 0) { if (self.destroyListSimple.items.len > 0) {
var i: i32 = @intCast(self.destroyListSimple.items.len - 1); var i: i32 = @intCast(self.destroyListSimple.items.len - 1);
while (i >= 0) : (i -= 1) { while (i >= 0) : (i -= 1) {
const item = self.destroyListSimple.items[@as(usize, @intCast(i))]; const item = self.destroyListSimple.items[@as(usize, @intCast(i))];
if (item.vtable.deinit_func) |deinitFn| { self.destroyObject(item);
deinitFn(item.ptr);
}
} }
} }
self.dependentsDestroyed.store(true, .seq_cst); self.dependentsDestroyed.store(true, .seq_cst);

View File

@ -167,7 +167,8 @@ pub const EngineObjectVTable = struct {
singletonName: ?[]const u8 = null, singletonName: ?[]const u8 = null,
init_func: *const fn (std.mem.Allocator) EngineDataEventError!*anyopaque, // new init_function passes in an already created object
init_func: *const fn (*anyopaque, std.mem.Allocator, bool) EngineDataEventError!void,
tick_func: ?*const fn (*anyopaque, f64) void = null, tick_func: ?*const fn (*anyopaque, f64) void = null,
engineDraw_func: ?*const fn (*anyopaque, f64) void = null, engineDraw_func: ?*const fn (*anyopaque, f64) void = null,
preTick_func: ?*const fn (*anyopaque, f64) EngineDataEventError!void = null, preTick_func: ?*const fn (*anyopaque, f64) EngineDataEventError!void = null,
@ -271,11 +272,10 @@ pub const EngineObjectVTable = struct {
if (@hasDecl(TargetType, "init")) { if (@hasDecl(TargetType, "init")) {
const wrappedInit = struct { const wrappedInit = struct {
const funcFind: @TypeOf(@field(TargetType, "init")) = @field(TargetType, "init"); pub fn func(p: *anyopaque, allocator: std.mem.Allocator, first: bool) EngineDataEventError!void {
const newObject: *TargetType = @ptrCast(@alignCast(p)); // funcFind(allocator) catch return error.BadInit;
pub fn func(allocator: std.mem.Allocator) EngineDataEventError!*anyopaque { newObject.init(allocator, first) catch return error.BadInit;
const newObject = funcFind(allocator) catch return error.BadInit; // return @as(*anyopaque, @ptrCast(newObject));
return @as(*anyopaque, @ptrCast(newObject));
} }
}; };
@ -284,11 +284,10 @@ pub const EngineObjectVTable = struct {
if (@hasDecl(TargetType, "create")) { if (@hasDecl(TargetType, "create")) {
const wrappedInit = struct { const wrappedInit = struct {
const funcFind: @TypeOf(@field(TargetType, "create")) = @field(TargetType, "create"); pub fn func(p: *anyopaque, allocator: std.mem.Allocator, first: bool) EngineDataEventError!void {
const newObject: *TargetType = @ptrCast(@alignCast(p)); // funcFind(allocator) catch return error.BadInit;
pub fn func(allocator: std.mem.Allocator) EngineDataEventError!*anyopaque { newObject.create(allocator, first) catch return error.BadInit;
const newObject = funcFind(allocator) catch return error.BadInit; // return @as(*anyopaque, @ptrCast(newObject));
return @as(*anyopaque, @ptrCast(newObject));
} }
}; };

View File

@ -121,22 +121,23 @@ fn dllChangedCallback(pathChanged: []const u8, ctx: ?*anyopaque) void {
} }
pub const ModuleLoader = struct { pub const ModuleLoader = struct {
backingAllocator: std.mem.Allocator, backingAllocator: std.mem.Allocator = undefined,
arena: std.heap.ArenaAllocator, arena: std.heap.ArenaAllocator = undefined,
loadedModules: std.ArrayListUnmanaged(*LoadedModule) = .{}, loadedModules: std.ArrayListUnmanaged(*LoadedModule) = .{},
watchInitialized: bool = false, watchInitialized: bool = false,
watchInitializeFn: ?*const fn () void = null, watchInitializeFn: ?*const fn () void = null,
pub var NeonObjectTable = core.EngineObjectVTable.from(@This(), "core.ModuleLoader"); pub var NeonObjectTable = core.EngineObjectVTable.from(@This(), "core.ModuleLoader");
pub fn create(allocator: std.mem.Allocator) !*@This() {
const self = try allocator.create(@This()); pub fn create(self: *@This(), allocator: std.mem.Allocator, first: bool) !void {
if (!first) {
return;
}
self.* = .{ self.* = .{
.backingAllocator = allocator, .backingAllocator = allocator,
.arena = std.heap.ArenaAllocator.init(allocator), .arena = std.heap.ArenaAllocator.init(allocator),
}; };
return self;
} }
pub fn addModule(self: *@This(), moduleName: []const u8) !void { pub fn addModule(self: *@This(), moduleName: []const u8) !void {
@ -217,7 +218,6 @@ pub const ModuleLoader = struct {
pub fn destroy(self: *@This()) void { pub fn destroy(self: *@This()) void {
// std.fs.cwd().deleteTree(".modulecache") catch {}; // std.fs.cwd().deleteTree(".modulecache") catch {};
self.arena.deinit(); self.arena.deinit();
self.backingAllocator.destroy(self);
} }
}; };

View File

@ -71,21 +71,20 @@ pub const GameObjectSystem = struct {
// this is the new one, GameObjectList should be deleted after this passes initial usability // this is the new one, GameObjectList should be deleted after this passes initial usability
pub var NeonObjectTable = core.EngineObjectVTable.from(@This(), "core.GameObjectSystem"); pub var NeonObjectTable = core.EngineObjectVTable.from(@This(), "core.GameObjectSystem");
allocator: std.mem.Allocator, allocator: std.mem.Allocator = undefined,
objectDefinitions: std.AutoHashMapUnmanaged(u32, GameObjectInterfaceVTable) = .{}, objectDefinitions: std.AutoHashMapUnmanaged(u32, GameObjectInterfaceVTable) = .{},
typesArena: std.heap.ArenaAllocator, typesArena: std.heap.ArenaAllocator = undefined,
objectSpawnEvents: std.ArrayListUnmanaged(SpawnEvent) = .{}, objectSpawnEvents: std.ArrayListUnmanaged(SpawnEvent) = .{},
pub fn create(allocator: std.mem.Allocator) !*@This() { pub fn create(self: *@This(), allocator: std.mem.Allocator, first: bool) !void {
const self = try allocator.create(@This()); if (!first)
return;
self.* = .{ self.* = .{
.allocator = allocator, .allocator = allocator,
.typesArena = std.heap.ArenaAllocator.init(self.allocator), .typesArena = std.heap.ArenaAllocator.init(self.allocator),
}; };
return self;
} }
pub fn spawnObject(self: *@This(), comptime T: type, objectName: []const u8, parameters: SpawnParameters) !*T { pub fn spawnObject(self: *@This(), comptime T: type, objectName: []const u8, parameters: SpawnParameters) !*T {
@ -179,7 +178,6 @@ pub const GameObjectSystem = struct {
pub fn destroy(self: *@This()) void { pub fn destroy(self: *@This()) void {
self.typesArena.deinit(); self.typesArena.deinit();
self.allocator.destroy(self);
} }
}; };

View File

@ -574,11 +574,11 @@ pub const BindingLayer = struct {
// not gonna actually deal with layers right now // not gonna actually deal with layers right now
pub const InputStack = struct { pub const InputStack = struct {
allocator: std.mem.Allocator, allocator: std.mem.Allocator = undefined,
active: ?*BindingLayer, active: ?*BindingLayer = undefined,
bindingStack: std.ArrayListUnmanaged(*BindingLayer) = .{}, bindingStack: std.ArrayListUnmanaged(*BindingLayer) = .{},
arena: std.heap.ArenaAllocator, arena: std.heap.ArenaAllocator = undefined,
keysDown: std.AutoHashMapUnmanaged(Key, bool) = .{}, keysDown: std.AutoHashMapUnmanaged(Key, bool) = .{},
@ -591,8 +591,10 @@ pub const InputStack = struct {
pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.InputStack"); pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.InputStack");
pub fn init(allocator: std.mem.Allocator) !*@This() { pub fn init(self: *@This(), allocator: std.mem.Allocator, first: bool) !void {
const self = try allocator.create(@This()); if (!first) {
return;
}
self.* = .{ self.* = .{
.allocator = allocator, .allocator = allocator,
@ -601,8 +603,6 @@ pub const InputStack = struct {
}; };
core.EngineObject(@This()).gInstance = self; core.EngineObject(@This()).gInstance = self;
return self;
} }
pub fn updatePreviousInputs(self: *@This()) void { pub fn updatePreviousInputs(self: *@This()) void {
@ -716,7 +716,6 @@ pub const InputStack = struct {
if (self.active) |active| { if (self.active) |active| {
active.destroy(); active.destroy();
} }
self.allocator.destroy(self);
} }
}; };

View File

@ -192,13 +192,13 @@ pub const FileLog = struct {
pub const LoggerSys = struct { pub const LoggerSys = struct {
pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.LoggerSys"); pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.LoggerSys");
writeOutBuffer: std.ArrayList(u8), writeOutBuffer: std.ArrayList(u8) = .{},
flushBuffer: std.ArrayList(u8), flushBuffer: std.ArrayList(u8) = .{},
allocator: std.mem.Allocator, allocator: std.mem.Allocator = undefined,
logFilePath: []const u8, logFilePath: []const u8 = "none",
logFile: std.fs.File, logFile: std.fs.File = undefined,
consoleFile: std.fs.File, consoleFile: std.fs.File = undefined,
writerBuffer: []u8, writerBuffer: []u8 = undefined,
lock: std.Thread.Mutex = .{}, lock: std.Thread.Mutex = .{},
flushing: std.atomic.Value(bool) = std.atomic.Value(bool).init(false), flushing: std.atomic.Value(bool) = std.atomic.Value(bool).init(false),
@ -306,12 +306,14 @@ pub const LoggerSys = struct {
} }
} }
pub fn init(allocator: std.mem.Allocator) !*@This() { pub fn init(self: *@This(), allocator: std.mem.Allocator, first: bool) !void {
if (!first) {
return;
}
const cwd = std.fs.cwd(); const cwd = std.fs.cwd();
const ofile = std.fmt.allocPrint(allocator, core.DefaultSavePath ++ "/{s}", .{"Session_Log.txt"}) catch unreachable; const ofile = std.fmt.allocPrint(allocator, core.DefaultSavePath ++ "/{s}", .{"Session_Log.txt"}) catch unreachable;
cwd.makePath(core.DefaultSavePath) catch unreachable; cwd.makePath(core.DefaultSavePath) catch unreachable;
const self = try allocator.create(@This());
self.* = @This(){ self.* = @This(){
.allocator = allocator, .allocator = allocator,
.writeOutBuffer = std.ArrayList(u8).initCapacity(allocator, LogBufferSize) catch unreachable, .writeOutBuffer = std.ArrayList(u8).initCapacity(allocator, LogBufferSize) catch unreachable,
@ -321,8 +323,6 @@ pub const LoggerSys = struct {
.logFile = cwd.createFile(ofile, .{}) catch unreachable, .logFile = cwd.createFile(ofile, .{}) catch unreachable,
.consoleFile = std.fs.File.stdout(), .consoleFile = std.fs.File.stdout(),
}; };
return self;
} }
pub fn deinit(self: *@This()) void { pub fn deinit(self: *@This()) void {
@ -333,8 +333,6 @@ pub const LoggerSys = struct {
self.writeOutBuffer.deinit(self.allocator); self.writeOutBuffer.deinit(self.allocator);
self.flushBuffer.deinit(self.allocator); self.flushBuffer.deinit(self.allocator);
self.allocator.destroy(self);
} }
pub fn processEvents(self: *@This(), frameNumber: u64) core.EngineDataEventError!void { pub fn processEvents(self: *@This(), frameNumber: u64) core.EngineDataEventError!void {

View File

@ -296,9 +296,9 @@ fn childAllocator() std.mem.Allocator {
pub const SceneSystem = struct { pub const SceneSystem = struct {
pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.SceneSystem"); pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "core.SceneSystem");
allocator: std.mem.Allocator, allocator: std.mem.Allocator = undefined,
dynamicObjects: ArrayListUnmanaged(core.ObjectHandle) = .{}, dynamicObjects: ArrayListUnmanaged(core.ObjectHandle) = .{},
childrenArena: std.heap.ArenaAllocator, childrenArena: std.heap.ArenaAllocator = undefined,
tickCount: u32 = 0, tickCount: u32 = 0,
sceneObjectContainer: *SceneObjectSet = undefined, sceneObjectContainer: *SceneObjectSet = undefined,
@ -385,8 +385,11 @@ pub const SceneSystem = struct {
pub const MaxWorkerCount = 24; pub const MaxWorkerCount = 24;
// ----- NeonObject interace ---- // ----- NeonObject interace ----
pub fn init(allocator: std.mem.Allocator) !*@This() { pub fn init(self: *@This(), allocator: std.mem.Allocator, first: bool) !void {
const self = try allocator.create(@This()); if (!first) {
return;
}
self.* = .{ self.* = .{
.allocator = allocator, .allocator = allocator,
.childrenArena = std.heap.ArenaAllocator.init(allocator), .childrenArena = std.heap.ArenaAllocator.init(allocator),
@ -401,8 +404,6 @@ pub const SceneSystem = struct {
try self.cachedOutputs.append(self.allocator, .{}); try self.cachedOutputs.append(self.allocator, .{});
try self.writeOutList.append(self.allocator, .{}); try self.writeOutList.append(self.allocator, .{});
} }
return self;
} }
pub fn getOutputList(self: *@This(), threadId: u32) !*std.ArrayList(usize) { pub fn getOutputList(self: *@This(), threadId: u32) !*std.ArrayList(usize) {
@ -446,7 +447,6 @@ pub const SceneSystem = struct {
Scene.SceneObjectContainer.destroy(); Scene.SceneObjectContainer.destroy();
self.cachedOutputs.deinit(self.allocator); self.cachedOutputs.deinit(self.allocator);
self.writeOutList.deinit(self.allocator); self.writeOutList.deinit(self.allocator);
self.allocator.destroy(self);
} }
}; };

View File

@ -1,22 +1,17 @@
pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "testing.sampleSubsystem"); pub var NeonObjectTable: core.EngineObjectVTable = core.EngineObjectVTable.from(@This(), "testing.sampleSubsystem");
allocator: std.mem.Allocator, allocator: std.mem.Allocator = undefined,
scene: *anyopaque, scene: *anyopaque = undefined,
setPositionPtr: *const anyopaque, setPositionPtr: *const anyopaque = undefined,
pub fn init(self: *@This(), allocator: std.mem.Allocator, first: bool) !void {
if (!first) {
return;
}
pub fn create(allocator: std.mem.Allocator) !*@This() {
const self = try allocator.create(@This());
self.* = .{ self.* = .{
.allocator = allocator, .allocator = allocator,
.scene = undefined,
.setPositionPtr = undefined,
}; };
return self;
}
pub fn destroy(self: *@This()) void {
self.allocator.destroy(self);
} }
const exampleScene = @import("exampleScene.zig"); const exampleScene = @import("exampleScene.zig");