Commit c310d511 authored by Martin Finkel's avatar Martin Finkel

docs: add "single libvlc instance" to best practices section

parent a9a1355d
......@@ -4,6 +4,11 @@ This page will detail a set of best practices when using LibVLC/LibVLCSharp
[Back](home.md)
## Only create **one** LibVLC instance at all times
It is recommended by VLC core developers to only create a single instance of type `LibVLC` during your application's lifecycle.
You may create as many `MediaPlayer` objects as you want from a single `LibVLC` object.
## Dispose of libvlc objects when done
Since LibVLCSharp is a binding over native libvlc, LibVLCSharp types implement `IDisposable` which means the GC does not handle the disposal of these types, you do. Always call `Dispose()` on LibVLCSharp types when you're done using them (or use `using`).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment