mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
math and data module instances are now deleted when they have no more Lua references (matches the behaviour of other modules.) Fixes the deprecation system not fully restarting when love.event.quit("restart") is called.
Resolves issue #1462.
This commit is contained in:
@@ -91,12 +91,9 @@ static float noise4(float x, float y, float z, float w);
|
||||
|
||||
class Math : public Module
|
||||
{
|
||||
private:
|
||||
|
||||
RandomGenerator rng;
|
||||
|
||||
public:
|
||||
|
||||
Math();
|
||||
virtual ~Math();
|
||||
|
||||
RandomGenerator *getRandomGenerator()
|
||||
@@ -128,11 +125,9 @@ public:
|
||||
return "love.math";
|
||||
}
|
||||
|
||||
static Math instance;
|
||||
|
||||
private:
|
||||
|
||||
Math();
|
||||
RandomGenerator rng;
|
||||
|
||||
}; // Math
|
||||
|
||||
|
||||
Reference in New Issue
Block a user