Allocate without GC?

Delphi RTL supports ARC and NON ARC projects… hence apparently it’s usefull :slight_smile:

That, or it’s a sign that Delphi was created in 1994.

1 Like

That doesn’t matter. Show me one example where GC beats a manually managed memory application.
If one would want a GC he or she would use C#, Java etc.

Even a concurent GC would still freeze.

Great example.

In most cases those “pauses” are not noticeable. In any case, I already enumerated the advantages of a gc above.

When Xamarin become free, I try it to make an Android game (for learning purpose).
It’s just 2D game but I notice some freezes.
It’s make my animation not smooth.
I minimize the freeze by dong frequent gc when freeze accepted (when AI thinking next move).

Also I think OpenGL resources like textures management better handled by ARC, not GC.

The tag is not SIlver, but I hope I can use Swift ARC (not GC) in Silver on Windows and Android NDK.

Island isn;t Xamarin, and Island isn’t .NET. Maybe give it a try and see how GC performs before condemning it?

1 Like

While I agree with this… there are certain API’s that need a stable memory buffer. So how to achieve this with a GC?

Under .NET you can pin memory and then GC will not touch or move it.
So, I don’t know about the internal GC used for non .NET compilers.

1 Like

Xamarin compiles to native too I think and they use GC also.

You can just do:

var lArr =new Byte[2048];
ReadFile(fHandle, @lArr[0], 2048)

and it won’t gc “larr”.

Right. How do I free it?

The GC will take care of that…