Re: Array List object?

2015-01-27 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 27, 2015 at 07:18:22AM +, Gan via Digitalmars-d-learn wrote: [...] > Okay now I'm very confused. When I have my program fully hidden behind > another window, my ram usage goes up without going down. Which my > program is partly visible it goes up a few mb then returns to the past >

Re: Array List object?

2015-01-27 Thread bearophile via Digitalmars-d-learn
And it's named "dynamic array", instead of "Array List object", it's not a class instance. Bye, bearophile

Re: Array List object?

2015-01-27 Thread bearophile via Digitalmars-d-learn
Gan: //Initializing the array tiles = new SBTile[](0); This is often useless. //Clearing the array tiles = []; This doesn't "clear" the array, it rebinds it to a null pointer. Bye, bearophile

Re: Array List object?

2015-01-26 Thread Gan via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 06:16:03 UTC, H. S. Teoh wrote: On Tue, Jan 27, 2015 at 06:02:38AM +, Gan via Digitalmars-d-learn wrote: On Tuesday, 27 January 2015 at 06:00:50 UTC, Gan wrote: >On Tuesday, 27 January 2015 at 05:32:09 UTC, Gan wrote: >>Hey I'm using normal arrays for my projec

Re: Array List object?

2015-01-26 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 27, 2015 at 06:02:38AM +, Gan via Digitalmars-d-learn wrote: > On Tuesday, 27 January 2015 at 06:00:50 UTC, Gan wrote: > >On Tuesday, 27 January 2015 at 05:32:09 UTC, Gan wrote: > >>Hey I'm using normal arrays for my project: > >>//Declaring the array > >>SBTile[] tiles; > >> > >>//

Re: Array List object?

2015-01-26 Thread Gan via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 06:00:50 UTC, Gan wrote: On Tuesday, 27 January 2015 at 05:32:09 UTC, Gan wrote: Hey I'm using normal arrays for my project: //Declaring the array SBTile[] tiles; //Initializing the array tiles = new SBTile[](0); //Clearing the array tiles = []; //Removing a til

Re: Array List object?

2015-01-26 Thread Gan via Digitalmars-d-learn
On Tuesday, 27 January 2015 at 05:32:09 UTC, Gan wrote: Hey I'm using normal arrays for my project: //Declaring the array SBTile[] tiles; //Initializing the array tiles = new SBTile[](0); //Clearing the array tiles = []; //Removing a tile at index i from the array tiles.remove(i); //Adding a

Array List object?

2015-01-26 Thread Gan via Digitalmars-d-learn
Hey I'm using normal arrays for my project: //Declaring the array SBTile[] tiles; //Initializing the array tiles = new SBTile[](0); //Clearing the array tiles = []; //Removing a tile at index i from the array tiles.remove(i); //Adding a tile to the array tiles ~= tile; But I think I'm doing s