You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Xiao, Ke" <kx...@microstrategy.com> on 2003/07/31 18:22:35 UTC

memory leak

Hi,
One memory tool shows some memory leak in Xalan. Looks like it happens here:

In XalanTransformer::terminate(), it  call "delete s_xsltInit" at first.
This will free all those global maps such as
XPathEnvSupportDefault::s_externalFunctions.

Then it call several uninstallGlobal() function to free other global tables.
Some of these tables are stored in the global map. e.g.
XalanEXSLTCommonFunctionsInstaller::uninstallGlobal() will try to free the
functions in XPathEnvSupportDefault::s_externalFunctions. Because
XPathEnvSupportDefault::s_externalFunctions is already freed, those
functions are not deleted.

I found this issue on UNIX, and debug on NT. 

Is this a true memory leak?

Thanks a lot,

Kevin.

Re: memory leak

Posted by da...@us.ibm.com.



Hi Kevin,

Yes, that could be a problem.  Why don't you open a Bugzilla report and
we'll look at it.

By the way, _please_ don't cc me on emails to the list.  All that does is
add yet another email to my inbox!

Thanks!

Dave



                                                                                                                                  
                      "Xiao, Ke"                                                                                                  
                      <kxiao@microstra         To:      xalan-c-users@xml.apache.org                                              
                      tegy.com>                cc:      "'david_n_bertoni@us.ibm.com'" <da...@us.ibm.com>               
                                               Subject: memory leak                                                               
                      07/31/2003 09:22                                                                                            
                      AM                                                                                                          
                                                                                                                                  



Hi,
One memory tool shows some memory leak in Xalan. Looks like it happens
here:


In XalanTransformer::terminate(), it  call "delete s_xsltInit" at first.
This will free all those global maps such as
XPathEnvSupportDefault::s_externalFunctions.


Then it call several uninstallGlobal() function to free other global
tables. Some of these tables are stored in the global map. e.g.
XalanEXSLTCommonFunctionsInstaller::uninstallGlobal() will try to free the
functions in XPathEnvSupportDefault::s_externalFunctions. Because
XPathEnvSupportDefault::s_externalFunctions is already freed, those
functions are not deleted.


I found this issue on UNIX, and debug on NT.


Is this a true memory leak?


Thanks a lot,


Kevin.