473,466 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

When is garbage collector for C++ is going to be a standard?

The Hans-Boehm garbage collector can be successfully used with C and
C++, but not yet a standard for C++.. Is there talks about Garbage
Collector to become in the C++ standard?

Jul 22 '05 #1
10 2002
"pachanga" <qu*******@yahoo.com> wrote...
The Hans-Boehm garbage collector can be successfully used with C and
C++, but not yet a standard for C++.. Is there talks about Garbage
Collector to become in the C++ standard?


Not AFAIK. Try asking in comp.std.c++, they discuss the Standard as
it is or as it will be.
Jul 22 '05 #2
Microsoft has C++/CLI. It allows you to use the gcnew keyword
to allocate garbage collected memory.

I hope they standardize it just like the CLI and C# language.

Deepa
--
http://www.EventHelix.com/EventStudio
EventStudio 2.5 - Generate Sequence Diagrams from plain text input

Jul 22 '05 #3
EventHelix.com wrote:
Microsoft has C++/CLI. It allows you to use the gcnew keyword
to allocate garbage collected memory.

I hope they standardize it just like the CLI and C# language.

C++/CLI *is* an upcoming standard.


--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 22 '05 #4
On Fri, 24 Dec 2004 06:35:57 +0200, Ioannis Vranos
<iv*@remove.this.grad.com> wrote in comp.lang.c++:
EventHelix.com wrote:
Microsoft has C++/CLI. It allows you to use the gcnew keyword
to allocate garbage collected memory.

I hope they standardize it just like the CLI and C# language.

C++/CLI *is* an upcoming standard.


Yes, but not a C++ language standard. So it is still off-topic here.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 22 '05 #5
The funny thing about garbage collector is that that was the main
issues about C# vs C++..

Jul 22 '05 #6
pachanga wrote:
The funny thing about garbage collector is that that was the
main issues about C# vs C++..


Yes, well if you want to whine that you won't use C++ if it doesn't
mandate GC, and as a result the entire world will end, you have chosen
the wrong newsgroup.

If you simply want GC though, you could use the Hans-Boehm collector.
That sounds more productive...

--
Dave O'Hearn

Jul 22 '05 #7
jd
Le Fri, 24 Dec 2004 10:29:25 -0800, Dave O'Hearn a écrit*:
pachanga wrote:
The funny thing about garbage collector is that that was the
main issues about C# vs C++..


Yes, well if you want to whine that you won't use C++ if it doesn't
mandate GC, and as a result the entire world will end, you have chosen
the wrong newsgroup.

If you simply want GC though, you could use the Hans-Boehm collector.
That sounds more productive...


C++ is not Java, neither C#. If you want garbage collection
just write one for you !
Jul 22 '05 #8
where is the big problem in picking up after yourself? I agree that
sometimes it's fun to just create new objects all the time, but not
having garbage collection doesn't seem like a big deal to me... as long
as you know what you're doing...

Jul 22 '05 #9
pachanga wrote:
The funny thing about garbage collector is that that was the main
issues about C# vs C++..

That is wrong (in other words a hoax). For example here is what has been
written in TC++PL on this matter (since 1997):
"C.9.1 Automatic Garbage Collection

When this regular approach isn’t sufficient, the programmer might use a
memory manager that finds unreferenced objects and reclaims their memory
in which to store new objects. This is usually called automatic garbage
collection, or simply garbage collection. Naturally, such a memory
manager is called a garbage collector.

The fundamental idea of garbage collection is that an object that is no
longer referred to in a program will not be accessed again, so its
memory can be safely reused for some new object. For example:

void f()
{
int* p = new int;

p = 0;

char* q = new char;
}

Here, the assignment p=0 makes the int unreferenced so that its memory
can be used for some other new object. Thus, the char might be allocated
in the same memory as the int so that q holds the value that p
originally had.

The standard does not require that an implementation supply a garbage
collector, but garbage collectors are increasingly used for C++ in areas
where their costs compare favorably to those of manual management of
free store. When comparing costs, consider the run time, memory usage,
reliability, portability, monetary cost of programming, monetary cost of
a garbage collector, and predictability of performance."

That aside, .NET's garbage collector (and more generally the CLI's), is
available to all the languages using it and not of C#, so you can write
C++ .NET garbage collected applications since VS 2002.

In other words the GC is not part of C#, but of CLI.

Also in .NET 2.0 and afterwards (and with the upcoming C++/CLI), C++
becomes the systems programming language of .NET (and CLI).
Some references mentioning why C++ becomes the systems programming
language of .NET and why it is better:
http://microsoft.sitestream.com/Tech...V333_Sutte.ppt
http://www.accu.org/conference/prese...keynote%29.pdf

Also check this new article:

http://msdn.microsoft.com/msdnmag/is...s/default.aspx

And a page of mine:

http://www23.brinkster.com/noicys/cppcli.htm


--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 22 '05 #10
> The Hans-Boehm garbage collector can be successfully used with C and
C++, but not yet a standard for C++..


Do you mean optional standard?

If yes, write a serious proposal and put it to the standards committee.

If no, then LOL, it will never get off the ground. It would break every
existing C++ program.

Stephen Howe
Jul 22 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Nick Jacobson | last post by:
In the Python documentation on Extending and Embedding (in section 1.10), there's a quote: "Maybe some day a sufficiently portable automatic garbage collector will be available for C. Until...
4
by: Scott Robinson | last post by:
I have been having trouble with the garbage collector and sockets. Unfortunately, google keeps telling me that the problem is the garbage collector ignoring dead (closed?) sockets instead of...
6
by: Ana | last post by:
Hi! I have problems with the following scenario: My application is developed using C# under .NET. It must run on all Windows versions starting from Windows 98. The user must open different...
8
by: HalcyonWild | last post by:
Hi, I installed the free version(command line only) of the digital mars c++ compiler. It said it features a garbage collection mechanism, but there was no documentation. I figured out that...
3
by: Fab | last post by:
Hi ! Maybe somebody has used a GC - I think to Hans Boehm's one, but other, if any, are welcome -. I need to use a GC in order to program an interpreter for a functional language. Memory...
44
by: Smokey Grindle | last post by:
I have a list box on my form, but I need to databind it to a data table that is a private member of the form's class... so I basically have Public Class MyForm priate m_MyTable as new datatable...
11
by: xicloid | last post by:
I'm trying to write a program that saves numbers without any duplications. I was thinking I could start by storing the first number in an array with size one, and if the next number is not in the...
46
by: Carlo Milanesi | last post by:
Hello, traditionally, in C++, dynamically allocated memory has been managed explicitly by calling "delete" in the application code. Now, in addition to the standard library strings, containers,...
0
by: raylopez99 | last post by:
I ran afoul of this Compiler error CS1612 recently, when trying to modify a Point, which I had made have a property. It's pointless to do this (initially it will compile, but you'll run into...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.