[vlc-devel] [PATCH 4/4] libvlc: add leak debugging code

Steve Lhomme robux4 at ycbcr.xyz
Wed Mar 13 13:24:26 CET 2019


On 3/13/2019 1:12 PM, Thomas Guillem wrote:
> On Wed, Mar 13, 2019, at 09:02, Steve Lhomme wrote:
>> disabled by default
> Why ? I would always enable it personally.

Ask the maintainer of that file.
Personally I add an option in configure that most of us would use.

>
>> ---
>>   src/libvlc.c | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> diff --git a/src/libvlc.c b/src/libvlc.c
>> index 8200f81d9e..a140aa3c00 100644
>> --- a/src/libvlc.c
>> +++ b/src/libvlc.c
>> @@ -450,6 +450,16 @@ void libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
>>   
>>       vlc_ExitDestroy( &priv->exit );
>>   
>> +#if 0
>> +    {
>> +        vlc_object_internals_t *internal = vlc_internals(p_libvlc);
>> +        if (atomic_load(&internal->refs) != 1)
>> +        {
>> +            fprintf(stderr, "=== vlc_object LEAKS detected ===\n");
>> +            DumpStructureLocked(VLC_OBJECT(p_libvlc), stderr, 0);
>> +        }
>> +    }
>> +#endif
>>       assert( atomic_load(&(vlc_internals(p_libvlc)->refs)) == 1 );
>>       vlc_object_delete(p_libvlc);
>>   }
>> -- 
>> 2.17.1
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list