Re: ATL/COM memory management
From: Arnaud Debaene (adebaene_at_club-internet.fr)
Date: 05/10/04
- Next message: Mark: "Read parts of file"
- Previous message: Simon Cooke: "Re: GlobalAlloc, HeapAlloc, VirtualAlloc, or malloc"
- In reply to: Sergei: "Re: ATL/COM memory management"
- Next in thread: Jag Man: "Re: ATL/COM memory management"
- Messages sorted by: [ date ] [ thread ]
Date: 10 May 2004 08:17:41 -0700
"Sergei" <sergei@nospam.summertime.mtu-net.ru> wrote in message news:<ueCJ7GDNEHA.2876@TK2MSFTNGP09.phx.gbl>...
> "Simon Trew" <noneofyour@business.guv> wrote in message news:Oz9p3rANEHA.2996@TK2MSFTNGP12.phx.gbl...
> > If you allocate with new then deallocate with delete.
>
> An array must be deallocated with delete []
> Even if allocated with new.
How do you allocate an array with new (not new[]) ?
> >
> > The array should probably be a private member, but actually the issue of
> > visibility (public/private/protected) is not very important when programming
> > for COM, because clients can only see interfaces, anyway.
>
> As important as in other cases of programming with classes.
> It's that Microsoft spoiled the fun with her all-public design of ATL
COM is not about progamming with classes, it is about programming with
interfaces. Thez fact that you use ATL classes under the cover is just
a detail of implementation.
What would be the interest of an interface with private or protected
members?
Now, it could be interesting to have a notion of "friend" interfaces.
Arnaud
MVP - VC
- Next message: Mark: "Read parts of file"
- Previous message: Simon Cooke: "Re: GlobalAlloc, HeapAlloc, VirtualAlloc, or malloc"
- In reply to: Sergei: "Re: ATL/COM memory management"
- Next in thread: Jag Man: "Re: ATL/COM memory management"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|