OutOfMemory
Yoticc opened this issue · comments
Hello, how are you?
How are things with this error?
@MrYotic Can you please send your code in a file? I am making mistakes with your code. It will be easy if you send me in a file
Good, https://dropmefiles.com/TCBa9 - Net 6.0
Calculate is part with GPU Calculating
I was able to solve this problem, the memory leak is completely gone.
For the most part, it was not in your library, but in my code. So, every iteration I created a new big array, but because somewhere in your code there was a reference to this array, the GC could not clear it, so a bunch of large ones accumulated array. I think this can be solved through the library, so that other people do not have such an error in the future.
As exapmple bad code with memory leak:
while(true)
{
int[] args = new int[1750000];
kernel.Exec(args);
}
As exapmple bad code without memory leak:
int[] args;
while(true)
{
args = new int[1750000];
kernel.Exec(args);
}