File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 100100/// where `N` is a serial number starting at 1 in each phase, `TIME` is the number of minutes
101101/// since 2000-01-01 00:00, and `FEATURE` is an arbitrary alphanumeric moniker for a particular
102102/// experimental feature.
103- #define POV_RAY_PRERELEASE "alpha.9841009 "
103+ #define POV_RAY_PRERELEASE "alpha.9844485 "
104104
105105#if defined(DOXYGEN ) && !defined(POV_RAY_PRERELEASE )
106106 // Work around doxygen being unable to document undefined macros.
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ Vector2d Uniform2dOnSquare(SequentialDoubleGeneratorPtr source)
226226{
227227 double x = (*source)();
228228 double y = (*source)();
229- return Vector2d ((*source)(), (*source)() );
229+ return Vector2d (x, y );
230230}
231231
232232Vector2d Uniform2dOnDisc (SequentialDoubleGeneratorPtr source)
Original file line number Diff line number Diff line change @@ -627,6 +627,23 @@ class VectorPool
627627 {
628628 if (initialPoolSize != 0 )
629629 mPool .reserve (initialPoolSize);
630+ #ifdef POV_CORE_DEBUG
631+ mAllocCount = 0 ;
632+ #endif
633+ }
634+
635+ ~VectorPool ()
636+ {
637+ for (auto && p : mPool )
638+ {
639+ delete p;
640+ #ifdef POV_CORE_DEBUG
641+ --mAllocCount ;
642+ #endif
643+ }
644+ #ifdef POV_CORE_DEBUG
645+ POV_CORE_ASSERT (mAllocCount == 0 );
646+ #endif
630647 }
631648
632649 VectorPool (const VectorPool&) = delete ;
@@ -638,6 +655,9 @@ class VectorPool
638655 if (mPool .empty ())
639656 {
640657 p = new VECTOR_T ();
658+ #ifdef POV_CORE_DEBUG
659+ ++mAllocCount ;
660+ #endif
641661 }
642662 else
643663 {
@@ -660,6 +680,9 @@ class VectorPool
660680
661681 vector<VECTOR_T*> mPool ;
662682 size_t mSizeHint ;
683+ #ifdef POV_CORE_DEBUG
684+ size_t mAllocCount ;
685+ #endif
663686};
664687
665688// ******************************************************************************
You can’t perform that action at this time.
0 commit comments