Skip to content

Commit 9e3537f

Browse files
committed
fix(sdk) : remove unwanted memory allocation
1 parent 3f4cad4 commit 9e3537f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

com.playeveryware.eos/Runtime/EOS_SDK/Generated/ContinuanceToken.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public ContinuanceToken(System.IntPtr innerHandle) : base(innerHandle)
3636
public Result ToString(out Utf8String outBuffer)
3737
{
3838
int inOutBufferLength = 1024;
39-
System.IntPtr outBufferAddress = Helper.AddAllocation(inOutBufferLength);
4039

4140
// PEW: Start modify
4241
// NOTES:
@@ -50,10 +49,10 @@ public Result ToString(out Utf8String outBuffer)
5049
// Call the EOS_ContinuanceToken_ToString function will a null buffer address to determine the correct buffer length.
5150
// Discard the result of this call because it is not relevant.
5251
_ = Bindings.EOS_ContinuanceToken_ToString(InnerHandle, System.IntPtr.Zero, ref inOutBufferLength);
53-
outBufferAddress = Helper.AddAllocation(inOutBufferLength);
54-
// PEW: End modify
52+
System.IntPtr outBufferAddress = Helper.AddAllocation(inOutBufferLength);
53+
// PEW: End modify
5554

56-
var funcResult = Bindings.EOS_ContinuanceToken_ToString(InnerHandle, outBufferAddress, ref inOutBufferLength);
55+
var funcResult = Bindings.EOS_ContinuanceToken_ToString(InnerHandle, outBufferAddress, ref inOutBufferLength);
5756

5857
Helper.Get(outBufferAddress, out outBuffer);
5958
Helper.Dispose(ref outBufferAddress);

0 commit comments

Comments
 (0)