Re: Safe handles and Marshal class
Peter Ritchie <[email protected]> Wed, 13 Feb 2008 12:51:38 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
> 1. You do not need to declare handle, SafeHandle class has protected > member handle. possibly a good optimization; but SafeHandle also has a SetHandle > 2. You are exposing handle publicly which is not good. I'm curious, how do you use a global memory handle without exposing the handle publicly? I was assuming "SafeGlobalMemoryHandle" would used for things like SetClipboardData and DocumentProperties where the typical usage is to pass the handle around--but you want to ensure the handle is freed more deterministically. =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com