Newbie questions on memory allocation
    BCS 
    none at anon.com
       
    Sat Jul 24 08:58:43 PDT 2010
    
    
  
Hello Deokjae,
> Hi there, I have some questions on the following code.
> 
> import std.stdio;
> 
> struct S {
> int x;
> }
> void main() {
> int[3] a = new int[3];//A
> S* b = new S();//B
> delete b;//C
> }
> What's the meaning of the line A?
> Is the array allocated on heap? or stack?
IITC new give you something on the heap in all cases.
-- 
... <IXOYE><
    
    
More information about the Digitalmars-d-learn
mailing list