Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
Hi,
You are right, Clear() does not have a memory zeroing function. From the documentation, Clear() calls Dispose() and GC.SuppressFinalize(). Dispose(true) will dispose of all resources used by the object and set them to null, then suppress the object's finalizer by calling GC.SuppressFinalize(this) . It just frees any unmanaged resources, but it doesn't guarantee that the managed memory used by the object will be zeroed out.
Best regards,
Wenbin Geng
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.