[chromium-dev] Re: memory leak in the jpeg_codec.cc

2009-07-06 Thread runtime
I sent a bug report http://code.google.com/p/chromium/issues/detail?id=15990 I don't know I did it correct or not. Lei Zhang wrote: It probably needs to be converted into a scoped_array like in JPEGCodec::Decode. Can you file a bug for this on http://crbug.com/ ? On Thu, Jul 2, 2009 at 5:59

[chromium-dev] Re: memory leak in the jpeg_codec.cc

2009-07-06 Thread Evan Martin
I don't understand this bug report. Where is the code path that allocates memory but doesn't free it? You just wrote if error happens in libjpeg but that is not clear. On Mon, Jul 6, 2009 at 1:50 AM, runtimerun_t...@tut.by wrote: I sent a bug report

[chromium-dev] Re: memory leak in the jpeg_codec.cc

2009-07-06 Thread Dean McNamee
I didn't either at first, and then Lei pointed out it's using set/longjmp. Gnarly. On Mon, Jul 6, 2009 at 4:26 PM, Evan Martine...@chromium.org wrote: I don't understand this bug report.  Where is the code path that allocates memory but doesn't free it?  You just wrote if error happens in

[chromium-dev] Re: memory leak in the jpeg_codec.cc

2009-07-06 Thread runtime
Probably it will be better use IJG memory manager. For example code in module JPEGImageDecoder.cpp, member function WebCore::JPEGImageReader::decode() : /* * Make a one-row-high sample array that will go away * when done with image. Always make it big enough to * hold an RGB row. Since this

[chromium-dev] Re: memory leak in the jpeg_codec.cc

2009-07-06 Thread runtime
I am not sure scoped_array helps cause of comment in JPEGCodec::Encode (). if (setjmp(errmgr.setjmp_buffer)) { // If we get here, the JPEG code has signaled an error. // MSDN notes: if you intend your code to be portable, do not rely on // correct destruction of frame-based objects

[chromium-dev] Re: memory leak in the jpeg_codec.cc

2009-07-02 Thread Lei Zhang
It probably needs to be converted into a scoped_array like in JPEGCodec::Decode. Can you file a bug for this on http://crbug.com/ ? On Thu, Jul 2, 2009 at 5:59 AM, runtimerun_t...@tut.by wrote: Hi There is memory leak in the module jpeg_codec.cc, member function bool JPEGCodec::Encode(const