On Wednesday, 26 November 2014 at 09:38:11 UTC, bearophile wrote:
Bear Cherian:
Class MyClass{
this(){}
void someFunction(){
//body
}
}
And in my app I had something like
MyClass classObject;
classObject.someFunction();
When I compile, no warnings or errors.
If
I ran into this a while ago and have already moved on, but I had
a class such as this
Class MyClass{
this(){}
void someFunction(){
//body
}
}
And in my app I had something like
MyClass classObject;
classObject.someFunction();
When I compile, no warnings or error
gc.malloc actually returns void[]
Bearophile's suggestion seems to work though, but it doesn't seem to improve
performance for some reason... I guess I'll have to find some other way to make
my
prog quicker.
Using D1, I have a program that creates tons of float[] ; for performance
reasons, I would like them to be uninitialized.
I've tried replacing
float[] f = new float[x];
by
float[] f = cast(float[])std.gc.malloc(x*4);
Unfortunately I keep running into "Access violation" and sometimes "Array
bound