On Tue, 5 Sep 2000, Andreas Mohr wrote:

> > Why do you ask here, it's easy to look up. The program is responsible for
> > deallocating the palette.
> OK, sorry.
> In the first place it's the program that is responsible.
> But what if it doesn't do that ?
> MSDN says:
> "When you no longer need the palette, call the DeleteObject function to delete
> it."
> So it says "call the", NOT "you have to call the".

What's the difference? "Call" is imperative tense, it is not a mere
suggestion, it's a commanding sentence, an order to be obeyed.

> So Windows might indeed do some kind of garbage collecting here.

I don't think you understood. In a well-behaving OS, any GDI objects the
application allocated would probably be deleted when the application
process terminates. Maybe. But absolutely no well-behaving OS would delete
any resource the application has allocated but not released while the
application is still running. Who decides when the application is done
with an object? There's only one sane way to tell - letting the
application tell, by letting it delete the object itself.

> How to implement that in Wine, if we need that ?

Simple. We don't.

> And it seems we need that, as I remember several cases with non-deleted
> palettes...
> (I think Netscape 3.x was the most obvious candidate for that)

I also seem to recall Netscape crashing a lot under real Windows...

Reply via email to