Class: Buffer
Lua
C++
Edit

Buffer::Clear

When a buffer is first created its contents are random. This method sets each byte in the allocated memory block to zero.

Syntax

Example

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    auto buffer = CreateBuffer(4);
    Print("Initial contents:" + String(buffer->PeekInt(0)));
    buffer->Clear();
    Print(buffer->PeekInt(0));
    return 0;
}
Copyright © 2024 Ultra Software.
All rights reserved.