lenochware Wrote:
> Well, I don't understand internal architecture at all, but from user's point
> of
> view it would be good keep some simple and nice way to remove object. I like
> if I
> can have things under control - if I want.
clear(myObjectThatMustGo);
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
> On 4/19/11 1:04 PM, Timon Gehr wrote:
> > Steven Schveighoffer wrote:
> >> And one other note -- delete will eventually be deprecated. In order to
> >> free memory, you must use clear and GC.free.
> >
> >> -Steve
> >
> >
Andrei:
> (Some GCs are unable to implement
> "delete" meaningfully.)
>
> Manual memory disposal for the GC heap will be implemented as a template
> function with semantics defined by the GC implementation.
Now the function(s) that replace "delete" are meant to be hints for the GC. In
a syste
On 4/19/11 1:04 PM, Timon Gehr wrote:
Steven Schveighoffer wrote:
And one other note -- delete will eventually be deprecated. In order to
free memory, you must use clear and GC.free.
-Steve
Well, why? It seems like a bad decision to me.
The feature is not going away, just the keyword.
"
On Tue, 19 Apr 2011 14:04:38 -0400, Timon Gehr wrote:
Steven Schveighoffer wrote:
And one other note -- delete will eventually be deprecated. In order to
free memory, you must use clear and GC.free.
-Steve
Well, why? It seems like a bad decision to me.
I'm neutral on the subject, you'd
Steven Schveighoffer wrote:
> And one other note -- delete will eventually be deprecated. In order to
> free memory, you must use clear and GC.free.
> -Steve
Well, why? It seems like a bad decision to me.
On Mon, 18 Apr 2011 15:17:11 -0400, KennyTM~ wrote:
On Apr 19, 11 01:25, Graham Fawcett wrote:
On Mon, 18 Apr 2011 11:38:56 -0400, Steven Schveighoffer wrote:
On Mon, 18 Apr 2011 11:21:46 -0400, Graham Fawcett
wrote:
[snip]
The recommended alternative to destruction is to use clear, since
On Apr 19, 11 01:25, Graham Fawcett wrote:
On Mon, 18 Apr 2011 11:38:56 -0400, Steven Schveighoffer wrote:
On Mon, 18 Apr 2011 11:21:46 -0400, Graham Fawcett
wrote:
[snip]
The recommended alternative to destruction is to use clear, since it
runs the appropriate finalizers, plus sets it to nu
On Mon, 18 Apr 2011 11:38:56 -0400, Steven Schveighoffer wrote:
> On Mon, 18 Apr 2011 11:21:46 -0400, Graham Fawcett
> wrote:
>
>> On Mon, 18 Apr 2011 10:03:10 -0400, Steven Schveighoffer wrote:
>>
>>> On Mon, 18 Apr 2011 09:44:38 -0400, lenochware
>>> wrote:
>>>
== Quote from Steven Schve
On Mon, 18 Apr 2011 11:21:46 -0400, Graham Fawcett
wrote:
On Mon, 18 Apr 2011 10:03:10 -0400, Steven Schveighoffer wrote:
On Mon, 18 Apr 2011 09:44:38 -0400, lenochware
wrote:
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Mon, 18 Apr 2011 04:31:26 -0400, %u wrot
On Mon, 18 Apr 2011 10:03:10 -0400, Steven Schveighoffer wrote:
> On Mon, 18 Apr 2011 09:44:38 -0400, lenochware
> wrote:
>
>> == Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
>>> On Mon, 18 Apr 2011 04:31:26 -0400, %u wrote:
>>> > Is it necessary free memory allocated for mem
On Mon, 18 Apr 2011 09:44:38 -0400, lenochware
wrote:
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Mon, 18 Apr 2011 04:31:26 -0400, %u wrote:
> Is it necessary free memory allocated for member of structure, like in
> C? I
> suppose not (we have gc). Example:
>
> str
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
> On Mon, 18 Apr 2011 04:31:26 -0400, %u wrote:
> > Is it necessary free memory allocated for member of structure, like in
> > C? I
> > suppose not (we have gc). Example:
> >
> > struct BITMAP {
> > (...)
> > ubyte[] pixels;
> > }
On Mon, 18 Apr 2011 04:31:26 -0400, %u wrote:
Is it necessary free memory allocated for member of structure, like in
C? I
suppose not (we have gc). Example:
struct BITMAP {
(...)
ubyte[] pixels;
}
BITMAP* bitmap = new BITMAP;
bitmap.pixels = new ubyte[100*100];
(...)
// delete bitmap.pixel
On 04/18/2011 10:31 AM, %u wrote:
Is it necessary free memory allocated for member of structure, like in C? I
suppose not (we have gc). Example:
struct BITMAP {
(...)
ubyte[] pixels;
}
BITMAP* bitmap = new BITMAP;
bitmap.pixels = new ubyte[100*100];
(...)
// delete bitmap.pixels; //not necessa
I see...thanks for answer. And if I call "delete bitmap", it will be removed
immediatelly, or it doesn't matter and gc will remove it when it will start its
cycle?
So even ubyte[] pixels will be allocated on the stack ?? What is prefered method
to allocate large byte array, then? Should I use mal
== Quote from %u (lenochw...@gmail.com)'s article
> Is it necessary free memory allocated for member of structure, like in C? I
> suppose not (we have gc). Example:
> struct BITMAP {
> (...)
> ubyte[] pixels;
> }
> BITMAP* bitmap = new BITMAP;
> bitmap.pixels = new ubyte[100*100];
> (...)
> // dele
Is it necessary free memory allocated for member of structure, like in C? I
suppose not (we have gc). Example:
struct BITMAP {
(...)
ubyte[] pixels;
}
BITMAP* bitmap = new BITMAP;
bitmap.pixels = new ubyte[100*100];
(...)
// delete bitmap.pixels; //not necessary?
delete bitmap;
18 matches
Mail list logo