hi i have one problem: i have 4 big arrays created as pixelBlock.PixelData in VBA, but when i try to rewrite this code to VB.NET i have Out of Memory exception. So i Try some debug.print Debug.Print(GC.GetTotalMemory(False)) and i found that max memory which i can use in VB.NET is about 401306192 bytes.. (this occur when i create base command in ArcMap and open Form when i have code like this
Dim pZ1(5060, 4951) As Single
Debug.Print(GC.GetTotalMemory(False))
Dim pZ2(5060, 4951) As Single
Debug.Print(GC.GetTotalMemory(False))
Dim pZ3(5060, 4951) As Single
Debug.Print(GC.GetTotalMemory(False))
Dim pZ4(5060, 4951) As Single
Debug.Print(GC.GetTotalMemory(False))
Dim pZ5(5060, 4951) As Single
Debug.Print(GC.GetTotalMemory(False))
but when i create normal windows Form application (without ArcObjects) and have the same code..i can use 3 time more memory (about 1102991660 bytes)
do you know where is a problem? is becase of using unmanaged COM object? or what? i tried to use GC.AddMemoryPressure method but nothing hapend (maybe wrong usages).
thanks for all your´s ideas..