From: Wolfgang Bangerth Date: Tue, 20 Oct 2020 01:26:29 +0000 (-0600) Subject: Add commentary. X-Git-Tag: v9.3.0-rc1~997^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=887d15ed6cca415aca666a7547aff6aaea386632;p=dealii.git Add commentary. --- diff --git a/source/particles/particle.cc b/source/particles/particle.cc index eea8eeabd2..d3568e0330 100644 --- a/source/particles/particle.cc +++ b/source/particles/particle.cc @@ -157,11 +157,15 @@ namespace Particles { if (this != &particle) { - location = particle.location; - reference_location = particle.reference_location; - id = particle.id; - property_pool = particle.property_pool; - properties = particle.properties; + location = particle.location; + reference_location = particle.reference_location; + id = particle.id; + property_pool = particle.property_pool; + properties = particle.properties; + + // We stole the rhs's properties, so we need to invalidate + // the handle the rhs holds lest it releases the memory that + // we still reference here. particle.properties = PropertyPool::invalid_handle; } return *this;