[Digikam-devel] Re: [Bug 267789] Make face detection (kface) and geo tagging (kmap) optional features

Marcel Wiesweg marcel.wiesweg at gmx.de
Mon Mar 14 18:37:16 GMT 2011


> K, So here is a quick low down on what I did and why. There was a memory
> leak as the pointer wasn't released when libface::Face was destroyed. So I
> have added that, which ultimately meant that no Face objects could be on
> stack, as they would be destroyed and subsequently pointer released. So I
> have changed the vectors to only contain pointers to the Face objects,
> meaning pointer wasn't released unnecessary, and would also cut down on
> amount of memory allocated.

Yes, I think this is a good thing to do. With Qt, we are used not to worry 
about this stuff, but with STL we need to worry.

> 
> This has resulted in downstream changes to interface. Subsequently some
> changes had to be made in libkface to accommodate for the same reasons. So
> I have changed a lot of QList<Face> references internally to QList<Face*>
> . I have made all necessary changes to the libkface and everything
> compiles fine. Except as I have described before there is a segfault in
> detection, which I haven't figured out yet. The patch is rather large to
> submit here because of all the changes, none the less I can still make it
> and post it here so everyone can patch it up.

Just commit to the libface-2.0 branch of libkface. It's all right to have a 
crash in there. Now that we are on git, we need to take the benefit of easy 
branching ;-)
If you have your changes as normal local changes in your libkface clone, just 
proceed with
git stash
git checkout -b libface-0.2 origin/libface-0.2
git stash pop
git commit ...
git push

> 
> On the different note I have merged the 0.2 branch with trunk so the latest
> copy is there. There is a 0.1 folder in the tags, if anyone needs the 0.1
> copy.

Ok



More information about the Digikam-devel mailing list