Performance & new Pen() / new Brush()



In my drawing code I recusrively create an average number of pens and
brushes of, let's guess: 300?
Would I see performance improvment by just caching those?

(actually I use and create all of them in a using() statment)

--
Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>


.



Relevant Pages

  • Re: Abuse of GDI+ resources
    ... I think you just did not test enough or paint events were not that frequent ... allocations you might / will run into problems sooner or later. ... there was a great deal of use of pens and brushes ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: D8: first impression and uneasy feeling... (long)
    ... But not the Brushes and Pens, ... In WinForms, you'll have to create any brush. ... "You can pretend to be serious; you can't pretend to be witty." ...
    (borland.public.delphi.non-technical)
  • Re: frequent redrawing issue
    ... For low resource objects such as pens and simple brushes a create-dispose ... For texturebrushes and fonts, you can create the object and keep it around. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Abuse of GDI+ resources
    ... there was a great deal of use of pens and brushes ... > Also, in a similar vein, we were discussing the use of a static pen object ... > GDI+ handle) are going to be held for the lifetime of the app if it's ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Abuse of GDI+ resources
    ... there was a great deal of use of pens and brushes ... Also, in a similar vein, we were discussing the use of a static pen object ... GDI+ handle) are going to be held for the lifetime of the app if it's ...
    (microsoft.public.dotnet.framework.windowsforms)