L
Larry Serflaten
I am making a DLL that has a class that will be made into
several similar objects for the user. I have a .gif file that
has all the parts those objects need. I am wondering what
the proper way to share that image across all the objects is
so I don't end up with that single .gif loaded multiple times.
I am thinking I should make a Friend class that has a shared
property that returns the image, but I want to be sure it is
returned ByRef, and not ByVal, or otherwise copied for
every call. The .gif file itself is an embeded resource and
I am thinking if I create it through the GetManifestResourceStream
method each time it is needed, then each time I'll be making
a copy of the same image.
What is the 'pattern' for this situation, and does anyone know
of a link to a VB.NET example?
Thanks!
LFS
several similar objects for the user. I have a .gif file that
has all the parts those objects need. I am wondering what
the proper way to share that image across all the objects is
so I don't end up with that single .gif loaded multiple times.
I am thinking I should make a Friend class that has a shared
property that returns the image, but I want to be sure it is
returned ByRef, and not ByVal, or otherwise copied for
every call. The .gif file itself is an embeded resource and
I am thinking if I create it through the GetManifestResourceStream
method each time it is needed, then each time I'll be making
a copy of the same image.
What is the 'pattern' for this situation, and does anyone know
of a link to a VB.NET example?
Thanks!
LFS