Commit 6798c08e authored by Martin Finkel's avatar Martin Finkel

Samples: Dispose resources in the F# sample

parent 486cc46b
......@@ -3,10 +3,13 @@ open LibVLCSharp
[<EntryPoint>]
let main argv =
printfn "Hello World from F#!"
Core.Initialize()
let libVLC = new LibVLC()
let mp = new MediaPlayer(libVLC)
mp.Play(new Media(libVLC, new Uri("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"))) |> ignore
let result = Console.ReadKey()
let media = new Media(libVLC, new Uri("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"))
mp.Play(media) |> ignore
media.Dispose()
Console.ReadKey() |> ignore
mp.Dispose()
libVLC.Dispose()
0
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