Click here to Skip to main content
15,890,982 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Access controls from other modules of a program [modified] Pin
mid=574113-Aug-07 12:35
mid=574113-Aug-07 12:35 
GeneralRe: Access controls from other modules of a program Pin
eugk13-Aug-07 15:52
eugk13-Aug-07 15:52 
GeneralRe: Access controls from other modules of a program [modified] Pin
mid=574113-Aug-07 16:12
mid=574113-Aug-07 16:12 
GeneralRe: Access controls from other modules of a program Pin
eugk13-Aug-07 20:26
eugk13-Aug-07 20:26 
QuestionWhat makes a class IDisposable? Pin
mid=574111-Aug-07 15:19
mid=574111-Aug-07 15:19 
AnswerRe: What makes a class IDisposable? Pin
Mark Salsbery12-Aug-07 7:30
Mark Salsbery12-Aug-07 7:30 
GeneralRe: What makes a class IDisposable? Pin
mid=574112-Aug-07 7:58
mid=574112-Aug-07 7:58 
GeneralRe: What makes a class IDisposable? Pin
Luc Pattyn12-Aug-07 8:41
sitebuilderLuc Pattyn12-Aug-07 8:41 
Hi Michael,

I don't know how it is in C++, this is what I can tell you about C#:

- structs are value types, they get allocated on the stack (in the stack frame
of the method that defines them) or inside an object that holds them (similar
to an int). You can "create" them with the new keyword, but that merely serves
as a way to pass initial values. No one cares about destroying them, they
disappear when the method returns.

- class objects are reference types; you create (i.e. allocate and initialize) them
with the new keyword (that would be gcnew in C++), and they get collected by the
gc if no live objects are referencing them any more.

- there is no such thing as a destructor, but you can have a class implement
the IDisposable interface by providing a Dispose method and stating the
interface explicitly.

- There is no automatic addition of a Dispose method or IDisposable interface (as
opposed to the article about C++).

Hope this helps.


Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


GeneralRe: What makes a class IDisposable? [modified] Pin
mid=574112-Aug-07 9:00
mid=574112-Aug-07 9:00 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 6:06
iddqd51513-Aug-07 6:06 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 6:15
mid=574113-Aug-07 6:15 
GeneralRe: What makes a class IDisposable? Pin
led mike13-Aug-07 6:28
led mike13-Aug-07 6:28 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 6:46
mid=574113-Aug-07 6:46 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 6:29
iddqd51513-Aug-07 6:29 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 6:45
mid=574113-Aug-07 6:45 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 7:32
iddqd51513-Aug-07 7:32 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 7:53
mid=574113-Aug-07 7:53 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 8:09
iddqd51513-Aug-07 8:09 
GeneralRe: What makes a class IDisposable? Pin
Mark Salsbery13-Aug-07 8:44
Mark Salsbery13-Aug-07 8:44 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 8:55
iddqd51513-Aug-07 8:55 
GeneralRe: What makes a class IDisposable? Pin
Mark Salsbery13-Aug-07 9:35
Mark Salsbery13-Aug-07 9:35 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 8:48
mid=574113-Aug-07 8:48 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 9:03
iddqd51513-Aug-07 9:03 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 9:15
mid=574113-Aug-07 9:15 
GeneralRe: What makes a class IDisposable? [modified] Pin
iddqd51513-Aug-07 9:19
iddqd51513-Aug-07 9:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.