• Tor Lillqvist's avatar
    It's fine to delete a NULL pointer · c744ff63
    Tor Lillqvist yazdı
    Calling delete on a NULL pointer does nothing. Checking for non-NULL just
    clutters the code.
    
    Still, I wonder if this code has some issues with heap corruption and/or
    leaks. The pImagesLst->GetEntryData() calls just return a copy of the OUString
    pointers stored in some kind of list, right? So is it correct to call delete
    on the copy, but keep the pointer in the list intact, which thus then will be
    pointing to freed memory, won't it? Or will the code automatically work in
    such a way that all pointers in the list will be handled exactly once (and
    deleted)?
    
    Perhaps running this under valgrind would be a good idea.
    
    Change-Id: Ibf401cc44caaeea6bb46f38cd9851ac14b2d2545
    c744ff63
Adı
Son kayıt (commit)
Son güncelleme
..
inc Loading commit data...
qa Loading commit data...
res Loading commit data...
sdi Loading commit data...
source Loading commit data...
uiconfig Loading commit data...
util Loading commit data...
workben Loading commit data...
xml Loading commit data...
xsl Loading commit data...
AllLangResTarget_sd.mk Loading commit data...
CppunitTest_sd_filters_test.mk Loading commit data...
CppunitTest_sd_regression_test.mk Loading commit data...
CppunitTest_sd_uimpress.mk Loading commit data...
JunitTest_sd_unoapi.mk Loading commit data...
Library_sd.mk Loading commit data...
Library_sdd.mk Loading commit data...
Library_sdfilt.mk Loading commit data...
Library_sdui.mk Loading commit data...
Makefile Loading commit data...
Module_sd.mk Loading commit data...
Package_inc.mk Loading commit data...
Package_web.mk Loading commit data...
Package_xml.mk Loading commit data...
README Loading commit data...
README_REMOTE Loading commit data...
UIConfig_sdraw.mk Loading commit data...
UIConfig_simpress.mk Loading commit data...