Re: [Orbit-python-list] Almost there (was: memory leak)
Status: Inactive
Brought to you by:
tack
From: Roland M. <ma...@ec...> - 2000-08-14 06:46:30
|
Roland Mas (2000-08-12 08:06:42 +0200) : > Well, I'm almost there. I spent the last two days (nights, actually) > in src/server.c, and I fiddled in it a bit. Here are my results. Two more nights, much progress. Now the server does not leak any memory anymore (yay!). The client still does, however, when calling object methods (as opposed to getting/setting attributes). > I think the leak you mention in src/server.c is not real (or, it is > not the only one). Without doing anything with opd, I manage to > suppress the memory leak in some cases. I guess g_free takes care of > things for you, but I wouldn't stake my life on it. Well, I was wrong there. But I fixed the problem: instead of allocating an operation description object for every request and failing to free part of it, my version now allocates the description object once only (when parsing the IDL), and thus need not deallocate anything. This fixed the memory leak in the server, and also in the client, but only for _get_* / _set_* methods. Work is in progress to kill the leak for other methods. I'm so ashamed of my code that I won't publish any patch now (it's really needing cleaning, there are bad comments and printf's everywhere, the old code is merely commented out, and the indentation model is not the old one). I'll fix the last remaining leak tonight and do a bit of cleaning, and with any luck, I'll post an updated patch tomorrow morning (European morning, that is). Stay tuned. Oh, and after that, I'll have a look at the leak in structs and unions that you [Jason] mention. Could you explain a bit why you think there's a leak? The comment isn't really explicit... Roland. -- Roland Mas A lesson for you all: never fall in love during a total eclipse. -- Senex, in A Funny Thing Happened on the Way to the Forum |