[vlc-devel] [PATCH] vlc_common: Add C++ memory management helpers

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Jul 12 17:28:26 CEST 2018


On Thu, Jul 12, 2018, at 5:24 PM, Rémi Denis-Courmont wrote:
> Le torstaina 12. heinäkuuta 2018, 16.20.38 EEST Hugo Beauzée-Luyssen a écrit :
> > Those are coming from my medialibrary branch, but since I plan on using
> > them elsewhere at some point, might as well make them VLC wide
> > Those helpers won't accept void* so they can't directly wrap a malloc
> > call, but we could have additional wrapper that perform the
> > reinterpret_cast for the caller.
> 
> I cannot comment on the code, but can we have proper Doxygen?
> 

That can be arranged

> And if we get a lot of C++ wrappers, it might make sense to split them off to 
> a separate file.
> 

That's a good point, I was thinking about how to provide some helpers for type such as vlc_url_t, and I'll probably add a few wrapper classes or functions, so it might make sense to start externalize those.

I'm not sure what a proper name would be though... I can think of a few options:
vlc_cxx.h 
vlc_cxx_helpers.h (not sure I like the _helper part though)
vlc_memory (probably doesn't mention the c++ part enough)

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list