473,834 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SGCL - Garbage Collector for C++

SGCL is precise, parallel garbage collection library for C++ (at this time
for Windows 32/64 only). SGCL is free software published under University of
Illinois/NCSA Open Source License.

Get it at:
http://sourceforge.net/projects/sgcl/

Regards
Sebastian Nibisz

Feb 28 '08 #1
72 3473
Sebastian Nibisz a écrit :
SGCL is precise, parallel garbage collection library for C++ (at this
time for Windows 32/64 only). SGCL is free software published under
University of Illinois/NCSA Open Source License.

Get it at:
http://sourceforge.net/projects/sgcl/

Regards
Sebastian Nibisz
If you need garbage collection you should try D language.
Feb 28 '08 #2
* Sebastian Nibisz peremptorily fired off this memo:
SGCL is precise, parallel garbage collection library for C++ (at this time
for Windows 32/64 only).
Ridiculous.
SGCL is free software published under University of
Illinois/NCSA Open Source License.
Get it at:
http://sourceforge.net/projects/sgcl/
--
When the PC was launched, people knew it was important.
-- Bill Gates
Feb 28 '08 #3
If you need garbage collection you should try D language.

The D language doesn't have the parallel garbage collector.

Regards
Sebastian Nibisz

Feb 28 '08 #4
On Feb 28, 8:09 am, "Sebastian Nibisz" <EB...@poczta.o net.plwrote:
SGCL is precise, parallel garbage collection library for C++ (at this time
for Windows 32/64 only). SGCL is free software published under University of
Illinois/NCSA Open Source License.

Get it at:http://sourceforge.net/projects/sgcl/

Regards
Sebastian Nibisz
Garbage collection is for lazy rich folks who can't be bothered to
take out their own trash.
Feb 28 '08 #5
Garbage collection is for lazy rich folks who can't be bothered to
take out their own trash.
It's funny.
Feb 28 '08 #6
Garbage collection is for lazy rich folks who can't be bothered to
take out their own trash.
struct node
{
node* next;
};

node* root = new node;
node* n = root;

for (int x = 0; x < 1000000; ++x)
{
n = n->next = new node;
}

How to release memory?

Feb 28 '08 #7
node* root = new node;
node* n = root;

for (int x = 0; x < 10; ++x)
{
n = n->next = new node;
n->next = 0;
}

n=root;
while(n){
root=n;
n=n->next;
delete root;
}

is that 6 lines too much for you?
if your reply is yes then use a GC.
Be happy.

"Sebastian Nibisz" <EB***@poczta.o net.plha scritto nel messaggio
news:fq******** **@inews.gazeta .pl...
>Garbage collection is for lazy rich folks who can't be bothered to
take out their own trash.

struct node
{
node* next;
};

node* root = new node;
node* n = root;

for (int x = 0; x < 1000000; ++x)
{
n = n->next = new node;
}

How to release memory?

Feb 28 '08 #8
On 2008-02-28 17:26, Sebastian Nibisz wrote:
>Garbage collection is for lazy rich folks who can't be bothered to
take out their own trash.

struct node
{
node* next;
};

node* root = new node;
node* n = root;

for (int x = 0; x < 1000000; ++x)
{
n = n->next = new node;
}

How to release memory?
A recursive function?

--
Erik Wikström
Feb 28 '08 #9
Sebastian Nibisz wrote:
>Garbage collection is for lazy rich folks who can't be bothered to
take out their own trash.

struct node
{
node* next;
};

node* root = new node;
node* n = root;

for (int x = 0; x < 1000000; ++x)
{
n = n->next = new node;
}

How to release memory?
std::list<>
or boost::intrusiv e::list<>
or struct node { smart_pointer<n odenext; };
or explicit destruction as Alberto described
or allocation from a pool which is all deallocated together
or garbage collection.

All have their advantages and disadvantages. Personally I'm happy with
std::list 99% of the time. I'm actually quite curious to know what sort
of applications or users use garbage collection in C++, but I fear that
it's the sort of discussion that can deteriorate....
Phil.
Feb 28 '08 #10

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

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.