A
Aaron Anodide
Hello,
I am using the following template class as a shorthand for zero-ing memory:
template<class T>
class ZeroMem : public T
{
public:
ZeroMem(void)
{
ZeroMemory( this, sizeof(T) );
}
};
Then, I do things like:
ZeroMem<MYSTRUCT> mystruct;
My question is: Does using this have any runtime performance impact? My
hope is that the inline constructor causes this usage of this template to be
eqiv to a macro.
Thanks,
Aaron Anodide
I am using the following template class as a shorthand for zero-ing memory:
template<class T>
class ZeroMem : public T
{
public:
ZeroMem(void)
{
ZeroMemory( this, sizeof(T) );
}
};
Then, I do things like:
ZeroMem<MYSTRUCT> mystruct;
My question is: Does using this have any runtime performance impact? My
hope is that the inline constructor causes this usage of this template to be
eqiv to a macro.
Thanks,
Aaron Anodide