Skip to content
Discussion options

You must be logged in to vote

I would call this function as early as possible in your main function, but if that's not possible it's not a problem to call it multiple times.

Since you don't seem to want a custom memory allocator anyway, you can also recompile Jolt with JPH_DISABLE_CUSTOM_ALLOCATOR defined to remove the need to call RegisterDefaultAllocator. In this case JPH_OVERRIDE_NEW_DELETE defines to nothing.

See:

// Directly define the allocation functions
JPH_EXPORT void *Allocate(size_t inSize);
JPH_EXPORT void *Reallocate(void *inBlock, size_t inOldSize, size_t inNewSize);
JPH_EXPORT void Free(void *inBlock);
JPH_EXPORT void

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jrouwe
Comment options

@GreggoryAddison-AntiHeroGameStudio
Comment options

@jrouwe
Comment options

@GreggoryAddison-AntiHeroGameStudio
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants