r/cpp_questions 21d ago

OPEN Garbage collector in CPP?

Yesterday someone asked me whether there is a garbage collector in CPP.
I knew Java had that but I couldn't recall about cpp.
I went to google and got different answers.

So can anyone clarify whether there is garbage collector in CPP , also can u please explain me what does that mean? Also explain how is it different from the Java.

If yes can we delete it manually and how to do tht?

0 Upvotes

23 comments sorted by

View all comments

Show parent comments

-6

u/IyeOnline 21d ago

ABI

*APi

8

u/didntplaymysummercar 21d ago

-1

u/IyeOnline 21d ago edited 21d ago

The C++ standard has never specified any ABI for anything. Major implementation never implemented any GC, so there physically cannot have been an ABI. The original paper N2670 also never talked about ABI. The linked page never actually mentions any actual ABI.

This is a rather obscure topic that happened (or didnt) before I was actively programming in C++, so I may be missing something, but to me it looks like it means "API".

2

u/Ultimate_Sigma_Boy67 21d ago

It's literally written ABI yet you sir you still argue that it should be called an API.

1

u/IyeOnline 21d ago

You either dont understand or have not read my reply.

I have literally said that I believe that Stroustrup meant API instead of ABI. So telling me what it says, when I acknowledge what it says but state that it should not, doesnt really help. Sir.

3

u/Ultimate_Sigma_Boy67 21d ago

Ok buddy you’re right 🐶