initialize memory stream to 0

Hi

I have create a large memory stream and want to initialize of bytes to zero.
What is the best way to do that? I could make a loop, but wouldn't that be to slow?
bnzAsked:
Who is Participating?
 
MadshiConnect With a Mentor Commented:
A dword loop is quite fast (a byte loop is much slower), but you can also use "ZeroMemory(ms.Memory, ms.Size)". Don't know if that is faster than a dword loop, at least it's shorter...   :-)

Regards, Madshi.
0
 
GwenaCommented:
listening :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.