From: Alan W. I. <ai...@us...> - 2004-01-19 19:10:21
|
Update of /cvsroot/plplot/plplot/drivers In directory sc8-pr-cvs1:/tmp/cvs-serv21667 Modified Files: cgm.c dg300.c gd.c gnome.c hpgl.c impress.c linuxvga.c ljii.c ljiip.c mem.c ntk.c null.c pbm.c plmeta.c ps.c pstex.c tek.c tk.c tkwin.c xfig.c xwin.c Log Message: AWI for Andrew Ross memory management cleanup. Add #ifndef ENABLE_DYNDRIVERS ... #endif about the lines in plD_dispatch_init_XXXXX which assign pdt->pl_MenuStr and pdt->pl_DevName. If this is a dynamic driver then we have already assigned these strings in plcore.c using the database. We absolutely don't want to use a static string in the dynamic driver to initialise it with since that string will disappear once the driver is unloaded and we are left with no valid driver name or menu item. Oh and overwriting the string will also leak the previously allocated memory for the names. |