Problem with memoryleak in octstr
"Ken A. Redergård" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm trying to figure out why the following octstr function leak 1 byte
of memory for each iteration:
/* test_octstr.c */
#include <unistd.h>
#include "gwlib/gwlib.h"
int main(void) {
Octstr *os;
int i;
gwlib_init();
for (i = 0; i < 100; i++) {
os = octstr_format("sadfasdfasdfas");
octstr_append(os, octstr_imm("asdfasdfasdfasdf"));
octstr_destroy(os);
gwthread_sleep(1);
}
gwlib_shutdown();
return 0;
}
Watching this with "ps -C test_octstr -F" shows that for every four
seconds it leaks 4 bytes... Is the use of octstr incorrect or is it a
problem in gwlib ?
With regards,
-Ken.