Wow, THAT never happens in C!

K

Kamilche

I just discovered the debugging flags for the garbage collector. Since
I have an insanely hierachical structure to my dataset, with
references all OVER the place, I thought I'd turn it on to make sure I
wasn't leaking.

Nothing happened. I searched the internet, and discovered how to
'force' a leak, so I tested with the single forced leak to see what
would happen. It worked.

My code did NOT have any leaks in it! :-D That's almost a miraculous
occurrence when programming in C.

I can't believe how much time I wasted trying to create my humongous
project with C. :-(

--Kamilche
 
P

Peter Hansen

Kamilche said:
I just discovered the debugging flags for the garbage collector. Since
I have an insanely hierachical structure to my dataset, with
references all OVER the place, I thought I'd turn it on to make sure I
wasn't leaking.

Nothing happened. I searched the internet, and discovered how to
'force' a leak, so I tested with the single forced leak to see what
would happen. It worked.

My code did NOT have any leaks in it! :-D That's almost a miraculous
occurrence when programming in C.

It's also pretty much always going to be the case with Python,
unless you accidentally build code that defeats the garbage
collection scheme (ie. loops and __del__) or are in the habit of
writing code where items accumulate in lists and are never removed.

The only real leak I've ever found with Python was a bug in the
Python code itself (long since fixed, by the way, and in fact
fixed in a later version even before I found it in the version I
was using).
I can't believe how much time I wasted trying to create my humongous
project with C. :-(

You speak for many of us. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top