MCPcopy Create free account
hub / github.com/apache/mesos / unallocate

Method unallocate

src/common/resources.cpp:1615–1628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1613
1614
1615void Resources::unallocate()
1616{
1617 foreach (
1618 Resource_Unsafe& resource_,
1619 resourcesNoMutationWithoutExclusiveOwnership) {
1620 if (resource_->resource.has_allocation_info()) {
1621 // Copy-on-write (if more than 1 reference).
1622 if (resource_.use_count() > 1) {
1623 resource_ = make_shared<Resource_>(*resource_);
1624 }
1625 resource_->resource.clear_allocation_info();
1626 }
1627 }
1628}
1629
1630
1631Resources Resources::filter(

Callers 1

foreachMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected