You may be suffering from versioning problems. Remove all asterisks from the
version tags in the AssemblyInfo file.

Signature
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
On Jan 3, 8:05 am, "Bob Powell [MVP]" <b...@spamkillerbobpowell.net>
wrote:
> You may be suffering from versioning problems. Remove all asterisks from the
> version tags in the AssemblyInfo file.
[quoted text clipped - 40 lines]
>
> - Show quoted text -
Thanks for the reply Bob. I tried removing the asterisks, but the
problem persisted. I'm certain this has something to do with me
disposing the Image objects incorrectly because it works fine when I
remove my disposing code. For example, my Image property on the child
control (which derives from Component) is:
public Image Graphic
{
get
{
return _Graphic;
}
set
{
if (!this.DesignMode)
{
// Dispose any previous graphic
if (null != _Graphic)
{
_Graphic.Dispose();
_Graphic = null;
}
}
_Graphic = value;
// Notify the container to redraw
if (null != this.TaskPanel)
{
this.TaskPanel.Invalidate();
}
}
}
If I comment out the check for DesignMode, the control will start
breaking in the using project when I rebuild the control project. I
assume this is because I'm disposing resources held by the Resource
Manager in the using app. I also assume that I should be disposing
the Image objects explicitly at runtime as shown in my code above.
Hopefully this makes sense. Please let me know if you have any more
insight into this behavior. Cheers!
Jared - 03 Jan 2008 19:22 GMT
> On Jan 3, 8:05 am, "Bob Powell [MVP]" <b...@spamkillerbobpowell.net>
> wrote:
[quoted text clipped - 93 lines]
>
> - Show quoted text -
I think I ended up outsmarting myself while trying to create a custom
control that didn't leak memory. My control shouldn't be disposing
resources that it didn't create, so I'll just remove my code that's
disposing the Image object. =)