vendredi 10 juillet 2020

Visual C++ GC Interface How to enable it and which library to include

I started learning GC interface in C++ and ran a few examples available on web in Visual 2019 C++ for below functions:

Each reference above has an example code which got compiled in my VC++ 2019 and successfully executed

What I am missing to understand that does VS2019 has GC by default enabled - I mean don't we need to enable some compiler switches or library to add for linking.

Also if GC is defautly enabled then why we do not have 'set_pointer_safety' but 'get_pointer_safety' only?

Then how can we use the GC features in VC++ some example that the memory is de-allocated as a result of GC?

Aucun commentaire:

Enregistrer un commentaire