|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.learn - Dtnamic array memory allocation
Does the dynamic array pre-allocate any memory?
I'm curious if the ~= on an array would be time sensitive. Would it make sense
to allocate memory myself and then reset the length?
class A
{
uint [] array;
:
this()
{
array = new uint [10];
array.length = 0;
}
}
Jan 07 2010
Rob Adelberg Wrote: Jan 07 2010
Rob Adelberg Wrote:Does the dynamic array pre-allocate any memory? Jan 08 2010
On Thu, 07 Jan 2010 23:32:21 -0500, Rob Adelberg <adelmetz mindspring.com> wrote:Does the dynamic array pre-allocate any memory? Jan 08 2010
|