Alexandre Julliard : msvcrt: Don't bother to clean up at process exit.

Christian Costa titan.costa at gmail.com
Tue May 21 05:58:30 CDT 2013


Out of curiosity. Not freeing these memory allocations shouldn't disturb
Valgrind to report false memory leaks?


2013/5/21 Alexandre Julliard <julliard at winehq.org>

> Dmitry Timoshkov <dmitry at baikal.ru> writes:
>
> > Alexandre Julliard <julliard at winehq.org> wrote:
> >
> >> >>    case DLL_PROCESS_DETACH:
> >> >> -    msvcrt_free_popen_data();
> >> >>      msvcrt_free_io();
> >> >> +    if (lpvReserved) break;
> >> >> +    msvcrt_free_popen_data();
> >> >>      msvcrt_free_mt_locks();
> >> >>      msvcrt_free_console();
> >> >>      msvcrt_free_args();
> >> >
> >> > Shouldn't msvcrt_free_io() be also protected by this guard?
> >>
> >> I think we still want to try to flush the file buffers.
> >
> > My point was that msvcrt_free_io() does much more than just flushing
> > file buffers, it also frees memory and deletes critical sections.
>
> It should probably call fflush or flushall instead, but that doesn't
> flush stdio. I'm not quite convinced that this is correct, it would need
> test cases.
>
> --
> Alexandre Julliard
> julliard at winehq.org
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130521/a1851c4e/attachment.html>


More information about the wine-devel mailing list