mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
GC: Eliminate unused code. v5.0.84
This commit is contained in:
parent
7d9dc69ae1
commit
ef0aefd546
8 changed files with 20 additions and 43 deletions
|
@ -50,25 +50,14 @@ SrsLazyObject::~SrsLazyObject()
|
|||
{
|
||||
}
|
||||
|
||||
SrsLazyObject* SrsLazyObject::gc_use(ISrsResource* wrapper)
|
||||
SrsLazyObject* SrsLazyObject::gc_use()
|
||||
{
|
||||
srs_assert(wrapper);
|
||||
if (std::find(gc_wrappers_.begin(), gc_wrappers_.end(), wrapper) == gc_wrappers_.end()) {
|
||||
gc_wrappers_.push_back(wrapper);
|
||||
}
|
||||
|
||||
gc_ref_++;
|
||||
return this;
|
||||
}
|
||||
|
||||
SrsLazyObject* SrsLazyObject::gc_dispose(ISrsResource* wrapper)
|
||||
SrsLazyObject* SrsLazyObject::gc_dispose()
|
||||
{
|
||||
srs_assert(wrapper);
|
||||
vector<ISrsResource*>::iterator it = std::find(gc_wrappers_.begin(), gc_wrappers_.end(), wrapper);
|
||||
if (it != gc_wrappers_.end()) {
|
||||
it = gc_wrappers_.erase(it);
|
||||
}
|
||||
|
||||
gc_ref_--;
|
||||
return this;
|
||||
}
|
||||
|
@ -88,11 +77,6 @@ ISrsResource* SrsLazyObject::gc_creator_wrapper()
|
|||
return gc_creator_wrapper_;
|
||||
}
|
||||
|
||||
ISrsResource* SrsLazyObject::gc_available_wrapper()
|
||||
{
|
||||
return gc_wrappers_.empty() ? NULL : gc_wrappers_.front();
|
||||
}
|
||||
|
||||
ISrsLazyGc::ISrsLazyGc()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue