I have a problem with my software. What has been happening is that I have noticed a slight increase in the amount of memory that my software takes up every time it changes an image's picture. For example:
Image1.BackgroundImage = ImageList1.Images.Item(0)
This code snippet would increase the amount of memory used by the size of the image in the imagelist.
One other code snippetsthat I have found to increase memory usage is:
Public Function ResImage(ByVal Resource As String) As Bitmap
Dim image As System.IO.Stream = GStreamResource(Resource)
Return New Bitmap(image)
Public Function GStreamResource(ByVal Name As String) As IO.Stream
Return System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(Application.ProductName & "." & Name)
and then calling:
ClickyImage.Image = ResImage("MyLittlePNG.png")
Am I thinking incorrectly that I am somehow wrongly assigning a picture to an image? Is VB just beign odd? AM I A BAD PROGRAMMER?!