RAII who?

Jan Hanselaer jan.hanselaer at gmail.com
Sat May 19 03:34:14 PDT 2007


Hi

I'm confused about what's meant with Resource Acquisition Is Initialisation. 
Can somebody explain this, especially how it is accomplished in D?
Some questions that  arise in my brain when reading and thinking about it.

- Giving each variable a default value is this part of RAII? Or has it 
nothing to do with it?
- What's the use of the keyword 'auto' in the whole story?
- What's the link with garbage collection?
- If I don't use the keyword auto, memory resources are not automatically 
freed?
- ...

I just don't seem to get te whole picture here. But I suspect it's not that 
complicated.
Anyone with a short and clear definition?

Thanks in advance!
Jan 





More information about the Digitalmars-d mailing list