Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
LibVLCSharp
Commits
6798c08e
Commit
6798c08e
authored
Sep 23, 2020
by
Martin Finkel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Samples: Dispose resources in the F# sample
parent
486cc46b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
samples/LibVLCSharp.FSharp.Sample/Program.fs
samples/LibVLCSharp.FSharp.Sample/Program.fs
+6
-3
No files found.
samples/LibVLCSharp.FSharp.Sample/Program.fs
View file @
6798c08e
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment