DescriptionI'm not familiar with this code but this CL is intended to fix the following 4 memory leaks:
80 bytes in 1 blocks are definitely lost in loss record 175 of 357
at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E986E: SkDocument::CreatePDF(SkWStream*, void (*)(SkWStream*), SkData* (*)(unsigned long*, SkBitmap const&), float) (SkDocument_PDF.cpp:92)
by 0x42EAA0: skiatest::document_testsClass::onRun(skiatest::Reporter*) (DocumentTest.cpp:12)
by 0x49670A: skiatest::Test::run() (Test.cpp:109)
by 0x48FDA0: SkTestRunnable::run() (skia_test.cpp:155)
The document created by SkDocument::CreatePDF is leaked in the test_empty test.
1,844 (96 direct, 1,748 indirect) bytes in 1 blocks are definitely lost in loss record 312 of 357
at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E98A2: SkDocument::CreatePDF(SkWStream*, void (*)(SkWStream*), SkData* (*)(unsigned long*, SkBitmap const&), float) (SkDocument_PDF.cpp:20)
by 0x42EB1F: skiatest::document_testsClass::onRun(skiatest::Reporter*) (DocumentTest.cpp:21)
by 0x49670A: skiatest::Test::run() (Test.cpp:109)
by 0x48FDA0: SkTestRunnable::run() (skia_test.cpp:155)
The SkPDFDocument allocated in SkDocument_PDF's ctor is leaked when the test is aborted in test_abort.
16 bytes in 1 blocks are definitely lost in loss record 55 of 357
at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E994D: SkDocument::CreatePDF(char const*, SkData* (*)(unsigned long*, SkBitmap const&), float) (SkDocument_PDF.cpp:102)
by 0x42EC7A: skiatest::document_testsClass::onRun(skiatest::Reporter*) (DocumentTest.cpp:45)
by 0x49670A: skiatest::Test::run() (Test.cpp:109)
by 0x48FDA0: SkTestRunnable::run() (skia_test.cpp:155)
The stream allocated in SkDocument::CreatePDF is leaked when the test is aborted in test_abortWithFile.
2,728 (96 direct, 2,632 indirect) bytes in 1 blocks are definitely lost in loss record 318 of 357
at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E99BF: SkDocument::CreatePDF(char const*, SkData* (*)(unsigned long*, SkBitmap const&), float) (SkDocument_PDF.cpp:20)
by 0x42EC7A: skiatest::document_testsClass::onRun(skiatest::Reporter*) (DocumentTest.cpp:45)
by 0x49670A: skiatest::Test::run() (Test.cpp:109)
by 0x48FDA0: SkTestRunnable::run() (skia_test.cpp:155)
The SkPDFDocument allocated in SkDocument_PDF's ctor is leaked when the test is aborted in test_abortWithFile.
Patch Set 1 #Patch Set 2 : Added aborted parameter #Patch Set 3 : Added comment #
Messages
Total messages: 4 (0 generated)
|