Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#229 closed defect (fixed)

delete RNG results in a bus error

Reported by: Peter Owned by: Jari Häkkinen
Priority: major Milestone: yat 0.4
Component: random Version: trunk
Keywords: Cc:

Description

RNG* rng=RNG::instance();
delete rng;

Change History (4)

comment:1 Changed 14 years ago by Jari Häkkinen

Status: newassigned

comment:2 Changed 14 years ago by Jari Häkkinen

Should delete really be allowed for a singleton? No!

However the bus error is due to a stupid

delete instance_;

in the RNG destructor.

comment:3 Changed 14 years ago by Jari Häkkinen

Resolution: fixed
Status: assignedclosed

(In [851]) Fixes #229.

comment:4 Changed 14 years ago by Jari Häkkinen

This was a stupid fix. Removing the delete instance_ only removes a symptom of a badly implemented class. See ticket:228 for further improvements of the RNG class.

Note: See TracTickets for help on using tickets.