Andrew Murie <andrewm treshna com> wrote: > > the problem is that repeatedly calling factory_GetDataObject() to create > an object and data_delete() to delete it slowly causes the server's > memory usage to increase, leading me to believe I'm not freeing all > resources correctly. > > does anyone have an example of using a factory to create and delete > objects? I have some code (ORBit 0.5.3 on Debian Woody GNU/Linux) which is bare-bones code: A factory to produce an object, and a delete() method on the object. The creation method uses the impl_foo_bar__create() function generated by orbit-idl, and the delete() method calls the impl_foo_bar__destroy() function, also generated by orbit-idl. This code leaks around 4 bytes every time I allocate and deallocate an object. I've looked into the code generated by orbit-idl, it looks to be deallocating everything it allocated. I followed the code into libORBit, and got lost along the way, but couldn't see anything obviously wrong. I'm not familiar enough with the ORBit code to find the cause of this problem. Like I said, this code is minimal, and as far as I can tell I haven't made any mistakes. I've decided the leak is somewhere within libORBit, I just can't find it. :( I've seen similar questions on the mailing list before, but no answers that solve the problem. -- Sam Couter | Internet Engineer | http://www.topic.com.au/ sam topic com au | tSA Consulting | PGP key available on key servers PGP key fingerprint: A46B 9BB5 3148 7BEA 1F05 5BD5 8530 03AE DE89 C75C
Attachment:
pgpbmt50JBzNt.pgp
Description: PGP signature