[vlc-devel] [PATCH] core: object: clear res from vlc_object_delete()

Rémi Denis-Courmont remi at remlab.net
Wed Jan 29 10:12:47 CET 2020


Hi,

I don't understand what the question is here. Either we take the code base and coding conventions in a direction that this patch becomes valid, or we don't take this patch. You can't have it both ways, AFAICT.

Le 29 janvier 2020 09:41:09 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>What I would like is being able to use objres in all modules without
>asking myself if the owner will handle it.
>
>So what do we do ?
>- Should each modules owner handle the resource clearing themselves ?
>In that case, we need to expose objres API in VLC core (for
>submodules).
> - Or apply this patch (+modifications mentioned by Steve)
>
>
>
>On Mon, Jan 27, 2020, at 19:53, Rémi Denis-Courmont wrote:
>> Le maanantaina 27. tammikuuta 2020, 17.08.47 EET Thomas Guillem a
>écrit :
>> > On Mon, Jan 27, 2020, at 15:00, Rémi Denis-Courmont wrote:
>> > > Hi,
>> > > 
>> > > I don't think that we require an object to be deleted after a
>single
>> > > module probe though (unlike the kernel), or do we?
>> > No we don't require it, and nothing prevent to load/unload
>different kind of
>> > module using one vlc_object.
>> 
>> In any case, you can't bind more than one module per object at a time
>if 
>> modules use object resources. But if you can bind multiple modules 
>> consecutively, then clearing resources at deletion is inadequate, as
>it could 
>> lead to temporary linear resource leak.
>> 
>> IIRC, the kernel explicitly forbids binding a driver and an object
>more than 
>> once, so then cleaning up resources at object deletion is a
>legitimate 
>> simplification. But it does not seem like it for VLC - or at least
>not so far.
>> 
>> -- 
>> Реми Дёни-Курмон
>> http://www.remlab.net/
>> 
>> 
>> 
>> _______________________________________________
>> 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

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200129/7a2ba69c/attachment.html>


More information about the vlc-devel mailing list