Here I created a template for getting an arrays base type. I also made the
std.string.replaceSlice function accessible with wstrings.
May someone could use it or integrate it into phobos...
(module std.traits)
template ArrayBaseType(A : E[],E)
{
alias E ArrayBaseType;
}
(module std.str
@downs:
That's what I even had beforejust allocate and release memory is not
difficult - just if you want to access the data the GC copies all the memory
into its heap...
I found a new way which is really good and easy:
Just use the Win32 Memory API for allocating and releasing your data
wi
@Ary Borenszweig: Good idea but I can't pipe data to a HTTP-server located
somewhere in the internet...
OK, I tried it with C's malloc and free - but everytime I access my array, D
puts the memory into its heap...I'm getting crazy because of this!
ubyte[] data=cast(ubyte[])malloc(50_000_000)[0
BCS Wrote:
> You can't. The D runtime (and most other runtimes) don't ever reduce the
> amount of memory they keep in the heap. If you where to allocate another
> 25MB right after that function you would see no change in the memory usage.
> The good news is that with virtual memory, all of that
Hello everyone,
I've got a problem with the following (very simple) code:
void foo()
{
void[] dat=new void[50_000_000]; // allocate 50 MByte of dummy-data
delete dat;
}
after I called foo() and watched the memory usage in the windows taskmanager,
the program blowed up to 50 MBytes al
Hello everybody, directly to my problem:
In class A I got a static array of delegates...
class A{
private static alias void delegate() EventHandler;
public static EventHandler[] MyEvent;
static void Foo()
{
foreach(eh; MyEvent) eh();
}
}
...and when I call Foo() from another Thread like...
i
Thank you very much! I hope that will work...
Hello evrybody...
I want to use all the opengl extensions like Shaders in my D2.0 prog...
I already got the opengl32.lib and also the headers...
I tried it wglGetProc (similar name...)! I could compile it but it hangs up
runtime and creates errors which dont tell me the actual problem...
and yes