Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
efd5d4bc
Commit
efd5d4bc
authored
Feb 19, 2019
by
Ignacio Etcheverry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C#: Throw ObjectDisposedException from disposed wrapper classes
parent
325efb60
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
4 deletions
+28
-4
Array.cs
modules/mono/glue/Managed/Files/Array.cs
+3
-0
Dictionary.cs
modules/mono/glue/Managed/Files/Dictionary.cs
+3
-0
NodePath.cs
modules/mono/glue/Managed/Files/NodePath.cs
+8
-2
Object.base.cs
modules/mono/glue/Managed/Files/Object.base.cs
+7
-1
RID.cs
modules/mono/glue/Managed/Files/RID.cs
+7
-1
No files found.
modules/mono/glue/Managed/Files/Array.cs
View file @
efd5d4bc
...
...
@@ -50,6 +50,9 @@ namespace Godot.Collections
internal
IntPtr
GetPtr
()
{
if
(
disposed
)
throw
new
ObjectDisposedException
(
GetType
().
FullName
);
return
safeHandle
.
DangerousGetHandle
();
}
...
...
modules/mono/glue/Managed/Files/Dictionary.cs
View file @
efd5d4bc
...
...
@@ -54,6 +54,9 @@ namespace Godot.Collections
internal
IntPtr
GetPtr
()
{
if
(
disposed
)
throw
new
ObjectDisposedException
(
GetType
().
FullName
);
return
safeHandle
.
DangerousGetHandle
();
}
...
...
modules/mono/glue/Managed/Files/NodePath.cs
View file @
efd5d4bc
...
...
@@ -11,7 +11,13 @@ namespace Godot
internal
static
IntPtr
GetPtr
(
NodePath
instance
)
{
return
instance
==
null
?
IntPtr
.
Zero
:
instance
.
ptr
;
if
(
instance
==
null
)
return
IntPtr
.
Zero
;
if
(
instance
.
disposed
)
throw
new
ObjectDisposedException
(
instance
.
GetType
().
FullName
);
return
instance
.
ptr
;
}
~
NodePath
()
...
...
@@ -49,7 +55,7 @@ namespace Godot
get
{
return
ptr
;
}
}
public
NodePath
()
:
this
(
string
.
Empty
)
{}
public
NodePath
()
:
this
(
string
.
Empty
)
{
}
public
NodePath
(
string
path
)
{
...
...
modules/mono/glue/Managed/Files/Object.base.cs
View file @
efd5d4bc
...
...
@@ -30,7 +30,13 @@ namespace Godot
internal
static
IntPtr
GetPtr
(
Object
instance
)
{
return
instance
==
null
?
IntPtr
.
Zero
:
instance
.
ptr
;
if
(
instance
==
null
)
return
IntPtr
.
Zero
;
if
(
instance
.
disposed
)
throw
new
ObjectDisposedException
(
instance
.
GetType
().
FullName
);
return
instance
.
ptr
;
}
~
Object
()
...
...
modules/mono/glue/Managed/Files/RID.cs
View file @
efd5d4bc
...
...
@@ -11,7 +11,13 @@ namespace Godot
internal
static
IntPtr
GetPtr
(
RID
instance
)
{
return
instance
==
null
?
IntPtr
.
Zero
:
instance
.
ptr
;
if
(
instance
==
null
)
return
IntPtr
.
Zero
;
if
(
instance
.
disposed
)
throw
new
ObjectDisposedException
(
instance
.
GetType
().
FullName
);
return
instance
.
ptr
;
}
~
RID
()
...
...
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