Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
8416c5ff
Commit
8416c5ff
authored
Feb 21, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup IDisposable support
parent
e93cab16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
bindings/cil/src/exception.cs
bindings/cil/src/exception.cs
+11
-6
bindings/cil/src/marshal.cs
bindings/cil/src/marshal.cs
+14
-2
No files found.
bindings/cil/src/exception.cs
View file @
8416c5ff
...
@@ -105,12 +105,6 @@ namespace VideoLAN.LibVLC
...
@@ -105,12 +105,6 @@ namespace VideoLAN.LibVLC
private
static
extern
void
Init
(
NativeException
e
);
private
static
extern
void
Init
(
NativeException
e
);
[
DllImport
(
"libvlc.dll"
,
EntryPoint
=
"libvlc_exception_clear"
)]
[
DllImport
(
"libvlc.dll"
,
EntryPoint
=
"libvlc_exception_clear"
)]
private
static
extern
void
Clear
(
NativeException
e
);
private
static
extern
void
Clear
(
NativeException
e
);
/*[DllImport ("libvlc.dll",
EntryPoint="libvlc_exception_raised")]
private static extern int Raised (NativeException e);*/
[
DllImport
(
"libvlc.dll"
,
EntryPoint
=
"libvlc_exception_get_message"
)]
private
static
extern
IntPtr
GetMessage
(
NativeException
e
);
public
NativeException
()
public
NativeException
()
{
{
...
@@ -142,6 +136,17 @@ namespace VideoLAN.LibVLC
...
@@ -142,6 +136,17 @@ namespace VideoLAN.LibVLC
/** IDisposable implementation. */
/** IDisposable implementation. */
public
void
Dispose
()
public
void
Dispose
()
{
Dispose
(
true
);
GC
.
SuppressFinalize
(
this
);
}
~
NativeException
()
{
Dispose
(
false
);
}
private
void
Dispose
(
bool
disposing
)
{
{
Clear
(
this
);
Clear
(
this
);
}
}
...
...
bindings/cil/src/marshal.cs
View file @
8416c5ff
...
@@ -97,8 +97,20 @@ namespace VideoLAN.LibVLC
...
@@ -97,8 +97,20 @@ namespace VideoLAN.LibVLC
*/
*/
public
void
Dispose
()
public
void
Dispose
()
{
{
ex
.
Dispose
();
Dispose
(
true
);
handle
.
Close
();
GC
.
SuppressFinalize
(
this
);
}
protected
virtual
void
Dispose
(
bool
disposing
)
{
if
(
disposing
)
{
ex
.
Dispose
();
if
(
handle
!=
null
)
handle
.
Close
();
}
ex
=
null
;
handle
=
null
;
}
}
};
};
};
};
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