Open McMurat opened 3 hours ago
Hey, I don't have examples using unsafe, can you create one with the expected output results?
All these methods are basically just adding it to a static array list if you look at the source code. In javascript everything is Int8Array or other types so freeMemory dont exist.
They do not need to be actually unsafe (that's obviously not possible in the web). It's enough to just forward the newUnsafeByteBuffer to the existing newByteBuffer implementation and treat the other two functions I mentioned as no ops. This will make existing code work. This whole unsafe thing is only for extra performance and does not add any functionality to the buffer.
Hello, to get my project running I need the following methods implemented in
com.badlogic.gdx.utils.BufferUtils
:This should be straightforward. The result of
getAllocatedBytesUnsafe
can be 0,disposeUnsafeByteBuffer
a no-op andnewUnsafeByteBuffer
can forward tonewByteBuffer
. Thank you.