You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The destructor function in Propagator, Spacecraft have been modified to comment out the delete operation on objects (orbit-state, orbit-epoch, attitude, interpolator) to which the class instance variables point to. This is because the objects are created outside and not by the Propagator/Spacecraft classes, and hence it seems better to not have the classes delete them. Hope it doesn't create any problems.
(On the other hands the objects pointed to by the instance variables, can be changed by the respective classes, hence these objects have a 1-1 association with these classes, and hence would make sense for them to be deleted by the classes)
Issue with Spacecraft class: When the copy operation is used, the objects are created by the Spacecraft class itself, in which case the deletion becomes the responsibility of the Spacecraft class.
See the CoverageChecker class which on other hand does not create PointGroup, Spacecraft objects (in the copy function). In this case the CoverageChecker class does not change the PointGroup or Spacecraft objects. In case of Spacecraft class however the OrbitState, OrbitEpoch, Attitude, Interpolator objects can be changed by the Spacecraft class itself, which would necessitate cloning of the respective objects in the copy function.
Memory problems may (not sure) happen if the CoverageChecker object is copied, and the copy/ original is destroyed. (Since some objects (pointArray, centralBody) appear to be shared between the copies.)
The text was updated successfully, but these errors were encountered:
The destructor function in
Propagator
,Spacecraft
have been modified to comment out the delete operation on objects (orbit-state, orbit-epoch, attitude, interpolator) to which the class instance variables point to. This is because the objects are created outside and not by thePropagator
/Spacecraft
classes, and hence it seems better to not have the classes delete them. Hope it doesn't create any problems.Issue with
Spacecraft
class: When the copy operation is used, the objects are created by theSpacecraft
class itself, in which case the deletion becomes the responsibility of theSpacecraft
class.See the
CoverageChecker
class which on other hand does not createPointGroup
,Spacecraft
objects (in the copy function). In this case theCoverageChecker
class does not change thePointGroup
orSpacecraft
objects. In case ofSpacecraft
class however theOrbitState
,OrbitEpoch
,Attitude
,Interpolator
objects can be changed by the Spacecraft class itself, which would necessitate cloning of the respective objects in the copy function.Memory problems may (not sure) happen if the
CoverageChecker
object is copied, and the copy/ original is destroyed. (Since some objects (pointArray
,centralBody
) appear to be shared between the copies.)The text was updated successfully, but these errors were encountered: