Is there a GC'd malloc alternative?
Chad J
gamerChad at _spamIsBad_gmail.com
Mon Feb 19 16:50:41 PST 2007
0ffh wrote:
>
>
> Well, thanks, "void d[]=new void[100];" seems to compile fine.
> Now I just wonder how many bytes 100 voids weight? :-)
> Do you think it would be evil to steal the pointer out of the
> array, because I'd really like to get a pointer as a result?
>
> Cheers, 0ffh
I'm not trying to be pedantic, but I get the feeling that "void[] d =
new void[100];" would be more appropriate to D style than using the C
style declaration of "void d[] = new void[100];". That is, put
array/pointer decorations on the type rather than the variable name.
Just thought you'd like to know.
More information about the Digitalmars-d
mailing list