I want to write an interface that expresses the following idea: "classes
implementing this interface must have a void function named update, with a
fixed but indeterminate number of parameters of the same (template parameter)
type." In other words, some implementing classes will have void updat
On Fri, Jul 3, 2009 at 2:54 PM, Doctor J wrote:
> I want to write an interface that expresses the following idea: "classes
> implementing this interface must have a void function named update, with a
> fixed but indeterminate number of parameters of the same (template parameter)
> type." In oth
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
On Fri, Jul 3, 2009 at 4:30 PM, AxelS wrote:
> 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 th
Reply to AxelS,
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 MByte
Hello, can anybody explain why the following code compiles with -version=works
but not without?
module test;
import std.stdio;
abstract class Parent
{
int opApply(int delegate(ref int) dg)
{
int fakeDelegate(ref uint fake, ref int content)
Apparently I'm missing some basic concept about how D does OO since I
recreated the problem with a simpler function. I'll re-examine things...
AxelS:
> void[] dat=new void[50_000_000]; // allocate 50 MByte of dummy-data
I am not sure, but the GC may scan that chunk of voids. If you need a raw block
it may be better to work with an array of uint.
> Why can't the GC remove that data and how CAN I remove it?
If you really need to