We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 338b4ec commit 66c7ffcCopy full SHA for 66c7ffc
README.md
@@ -37,7 +37,12 @@ unsafe
37
using (var memory = new Struct.StackMemory(sizeof(int) * 100))//Allocate memory for all your collections 400 byte.
38
{
39
40
- using var listOfInt32 = new Struct.ListOfInt32(50, &memory);//50 * 4 = 200 byte
+ using var listOfInt32 = new Struct.ListOfInt32(2, &memory);//2 * 4 = 8 byte
41
+ for(int i = 0; i< 48; i++)
42
+ {
43
+ listOfInt32.Add(in i);//+ 4 byte, shift index memory.Current by 4 byte: memory.Current +=4;
44
+ }
45
+ //listOfInt32 is 200 byte
46
list.ExpandCapacity(50);// + 200 byte
47
//Do whatever you want with list of Int32 items
48
}//return memory
0 commit comments