Saving a bitmap into a MemoryStream

.NET is a managed environment: specifically, memory allocation is usually managed on your behalf by the .NET runtime. You don’t typically need to allocate the memory yourself.

Sometimes, however, you do need to inform the runtime when you’ve finished with memory by using Close() or Dispose(). The using statement can be used to wrap a resource such as MemoryStream to tell the runtime that the memory can be reclaimed.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)