Skip to content

Commit

Permalink
Dispose future by setValue to nullptr.
Browse files Browse the repository at this point in the history
  • Loading branch information
create3000 committed Oct 3, 2018
1 parent 1942c88 commit f662b75
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions libtitania-x3d/Titania/X3D/Browser/X3DBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,7 @@ X3DBrowser::dispose ()
X3DBrowserContext::dispose ();
X3DBaseNode::dispose ();

if (future)
future -> dispose ();
future .setValue (nullptr);

supportedFields .reset ();
supportedNodes .reset ();
Expand Down
3 changes: 1 addition & 2 deletions libtitania-x3d/Titania/X3D/Components/Networking/Inline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,7 @@ Inline::traverse (const TraverseType type, X3DRenderObject* const renderObject)
void
Inline::dispose ()
{
if (future)
future -> dispose ();
future .setValue (nullptr);

X3DUrlObject::dispose ();
X3DBoundedObject::dispose ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,7 @@ Context::setError (const pb::pbError & error) const
void
Context::dispose ()
{
if (future)
future -> dispose ();
future .setValue (nullptr);

X3D::X3DJavaScriptContext::dispose ();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,7 @@ Context::error (JSContext* cx, const char* message, JSErrorReport* report)
void
Context::dispose ()
{
if (future)
future -> dispose ();
future .setValue (nullptr);

X3DJavaScriptContext::dispose ();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,7 @@ ExternProtoDeclaration::toJSONStream (std::ostream & ostream) const
void
ExternProtoDeclaration::dispose ()
{
if (future)
future -> dispose ();
future .setValue (nullptr);

getScene () -> removeExternProtoLoadCount (this);

Expand Down

0 comments on commit f662b75

Please sign in to comment.