On Fri, 2006-04-07 at 11:35 +0800, [EMAIL PROTECTED] wrote:
> I'm studying Mono. Today I read the code of CreateFile() function, I
> found that if the function forget to call g_free() to release the memory
> after conversion from utf16 to utf8. Right?

Where are you seeing this?  In mono/io-layer/io.c:CreateFile, I see
calls of ``g_free (filename);'' in several places -- when fd==-1, when
fd>=_wapi_fd_reserve, when fstat(2) fails, when the file sharing fails,
when the WAPI handle can't be allocated...

The only time `filename' isn't freed is when CreateFile() succeeds, and
that's because it's stored into the file_handle.filename field, which in
turn is copied into the `handle' pointer returned to the caller.

So I'm not seeing the memory leak you're referring to...

 - Jon


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to