Re: D8: first impression and uneasy feeling... (long)

From: Rudy Velthuis (TeamB) (rvelthuis_at_gmx.de)
Date: 02/21/04


Date: Sat, 21 Feb 2004 18:31:56 +0100

At 18:20:56, 21.02.2004, Dave Jewell wrote:

> "Rudy Velthuis (TeamB)" <rvelthuis@gmx.de> wrote in message
> news:xn0derixhpe7gi03m-moderator@newsgroups.borland.com...
>
> > In Delphi, all classes expose the same kind of object, and it already
> > has a SaveToFile as well.
>
> Yeah, ok, ok. :-) I've conceded that it would be nice if the FCL had
> this, but TBH, I don't rate it as a significant issue. The lack of
> 'foreach' in Object Pascal (for example) is likely to be more irksome
> on a day to day basis because you're going to want to iterate over a
> collection far more frequently than you'll want to save a listbox to a
> file. IMHO. ;-))

Like I sadi before: it is not just that one routine. Lots of similar
things are simply missing in WinForms.
 
> That seems somewhat unfair. Most of the time, the Graphics object you
> want to use has already been created.

But not the Brushes and Pens, etc.

> If you're using a custom brush
> in VCL, you'll need to create it.

In WinForms, you'll have to create any brush.

> With VCL, you'll likewise have to delete it

I guess you mean you'll have to Free it.

 which is NOT the case with .NET because of GC.

This is AFAIK not true. Items like Brushes and Pens are resources and
should be released as soon as possible.

-- 
Rudy Velthuis (TeamB)
"You can pretend to be serious; you can't pretend to be witty."
    - Sacha Guitry (1885-1957)


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: 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)

Loading