Issue with free() for linked list implementation

Namespace via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Apr 6 09:05:27 PDT 2015


> 2. When you malloc, you use 'two.sizeof' and 'ten.sizeof'. 
> Integers are 4 bytes, so you were allocating 4 bytes for each 
> of these (not 2 or 10 bytes as is alluded to above).
Yeah, my mistake. I saw the mistake but could not describe it 
correctly. :)


More information about the Digitalmars-d-learn mailing list