Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
d681ea89
Commit
d681ea89
authored
14 years ago
by
Andrew A. de Laix
Browse files
Options
Downloads
Patches
Plain Diff
Get rid of intrusive_ptr member to prevent crash on shutdown.
parent
1a711b3f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/viewer_components/updater/llupdatechecker.cpp
+7
-7
7 additions, 7 deletions
indra/viewer_components/updater/llupdatechecker.cpp
with
7 additions
and
7 deletions
indra/viewer_components/updater/llupdatechecker.cpp
+
7
−
7
View file @
d681ea89
...
...
@@ -70,7 +70,6 @@ class LLUpdateChecker::Implementation:
Client
&
mClient
;
LLHTTPClient
mHttpClient
;
bool
mInProgress
;
LLHTTPClient
::
ResponderPtr
mMe
;
std
::
string
mVersion
;
std
::
string
buildUrl
(
std
::
string
const
&
protocolVersion
,
std
::
string
const
&
hostUrl
,
...
...
@@ -109,8 +108,7 @@ const char * LLUpdateChecker::Implementation::sProtocolVersion = "v1.0";
LLUpdateChecker
::
Implementation
::
Implementation
(
LLUpdateChecker
::
Client
&
client
)
:
mClient
(
client
),
mInProgress
(
false
),
mMe
(
this
)
mInProgress
(
false
)
{
;
// No op.
}
...
...
@@ -118,7 +116,7 @@ LLUpdateChecker::Implementation::Implementation(LLUpdateChecker::Client & client
LLUpdateChecker
::
Implementation
::~
Implementation
()
{
mMe
.
reset
(
0
);
;
// No op.
}
...
...
@@ -136,9 +134,11 @@ void LLUpdateChecker::Implementation::check(std::string const & protocolVersion,
// The HTTP client will wrap a raw pointer in a boost::intrusive_ptr causing the
// passed object to be silently and automatically deleted. We pass a self-
// referential intrusive pointer stored as an attribute of this class to keep
// the client from deletig the update checker implementation instance.
mHttpClient
.
get
(
checkUrl
,
mMe
);
// referential intrusive pointer to which we add a reference to keep the
// client from deleting the update checker implementation instance.
LLHTTPClient
::
ResponderPtr
temporaryPtr
(
this
);
boost
::
intrusive_ptr_add_ref
(
temporaryPtr
.
get
());
mHttpClient
.
get
(
checkUrl
,
temporaryPtr
);
}
void
LLUpdateChecker
::
Implementation
::
completed
(
U32
status
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment