Friday, 9 August 2013

Should I do this?

Should I do this?

void Clients::SetFog(char* fog)
{
char Buffer[45];
sprintf(Buffer, "d %s", fog);
CMD(ID, SV_CMD_RELIABLE, Buffer);
RtlZeroMemory(Buffer, sizeof(char));
}
My question is; I'm unsure how Buffers, well chars and int type variables
are handled when defined within a function. As you notice I Zero it from
memory, I do this with almost all my functions that have defined types
just to keep memory clean, the type of app I'm building and the platform
it's for I cannot debug that deep / peek into memory.

No comments:

Post a Comment