On 23 Mar 2015, at 11:59am, Saurav Sarkar <saurav.sarkar1 at gmail.com> wrote:
> Thanks a lot Richard for your inputs. > > the link indeed looks positive enough :). > > Would like to know if anyone else has gone through similar experiences . SQLite depends on people calling certain library routines in a certain way. So, for instance, they might be told to call sqlite3_bind_blob() which allocates memory, but to pass as a parameter a routine which will release that memory. Naturally the analysis tool correctly detects a 'leak' in the routine because it cannot tell when the routine pointed-to by a parameter is going to be called. Other routines get called in pairs with, again, one allocating memory and the other releasing it. Most analysis tools see that the first part of the pair 'leaks' memory and generate an error for it, because they do not know that the programmer is expected to call the other routine later. So don't worry about it. If you have a human spotting any problem in the source code people here will pay a lot of attention to you, and bugs will be fixed. But static analysis tools cannot do a useful job for memory leaks in something like SQLite. Simon.