On Wed, 30 Jan 2013 19:15:20 +0200 Raphael Kubo da Costa <raphael.kubo.da.co...@intel.com> said:
sounds to me like a tonne of other libs are not being "nice" with fc. :) ie knowing to call fcini/fini. evas does this so valgrind stops bitching about not freeds/still reachable stuff on application shutdown - it reduces the noise. and well - evas handled ini/fini by "refcounts" knowing how many times it was initted vs shut down.. and then it shuts down.. i would "expect" fc to do the same... but it seems other libs are lazy and dont do this... so as a result, evas is following a much stricter clean "init and shtudown when u are done" model which at least allows you to write an app, use evas, then stop using it and for the next 10 weeks run it without ever using evas again and have stuff freed/shut down and out of memory (hopefully). if we don't init and shutdown .. then you keep resources around - in practice, not a problem, but in theory, can be. one big nasty though... fc maintains fc cache files. in ~/.fontconfig.... files survive a process exit. if any of these files were intended to be cleaned up on shutdown (normally are not - but let's assume fc's internals change to need to do this) we may see apps leaking junk/files/garbage in ~/.fontconfig if we are not letting fc know that t we are done and want to delete such out-of-process resources on a "clean" shutdown (yes a segv and so on will leave junk... thats life) > A few days ago I was investigating a bug in the EFL WebKit port and > noticed WebKit's and Evas' handling of Fontconfig are somewhat > incompatible: while the evas_font code calls both FcInit() and FcFini() > when on initialization and shutdown, respectively, WebKit keeps some > Fontconfig objects alive until the process exits. In practice, this > means that shutting Evas down will cause FcFini() to assert because > there are objects which have not been properly destroyed. > > This is not really a WebKit-specific problem, as any program which also > uses Fontconfig directly and shuts Evas down before destroying all FC > resources it has allocated is going to crash in the same way. > > Other libraries such as Qt, Pango and Cairo do not explicitly initialize > and shut Fontconfig down. Evas itself got this code in r40242 and was > later adjusted in r45829 and r74870. > > Since we can't completely control the lifetime of all Fontconfig objects > used in client code, I was thinking of doing the same thing as other > libraries do and get rid of the calls to FcInit() and FcFini(). The part > which is really important is not calling FcFini() -- this was already > done for a while in the r45829 which I mentioned. Valgrind will complain > about some "still reachable" memory blocks, but that's not really > important (as raster said in that revision's commit message, "things may > look like they leak in Valgrind - they dont. in reality"). > > Thoughts? > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel