nbody icon indicating copy to clipboard operation
nbody copied to clipboard

Rewrite C++ code

Open fding opened this issue 12 years ago • 1 comments

Right now, the C++ code might allow for memory leaks. In particular, a new System object is created upon every call of simulate(). We should investigate what happens to the memory that is allocated, and whether or not to change it so that C++ also only has a simulate function.

fding avatar May 08 '13 05:05 fding

Why you designed your solution as a C code? I wonder if you are making transition from FORTRAN 77 or from C to C++. You should at least try to wrap your code into classes and use Constructors instead of C-like init functions.

bgin avatar Apr 22 '16 15:04 bgin