What two kinds?
For the usual Math::MPFR objects, destruction is conducted as follows:
void DESTROY(mpfr_t * p) {
mpfr_clear(*p);
Safefree(p);
}
For this slightly different "kind" that I was hoping to introduce, it needs to be:
void DESTROY(mpfr_t * p) {
Safefree(p);
}
This is because, with the latter "kind", there's no dynamically allocated space for mpfr_clear() to clean up - and attempting to do so, simply causes a segfault.
My main difficulty is that, for both "kinds", the Devel::Peek::Dump() is essentially the same - which leads me to now think that blessing both "kinds" into the same package is a no-go. Initially, I thought I could make use of the TEMP flag - but that's a blind alley that grew out of a poorly designed test script (rather than an XY problem :-)
If I had realised sooner just what the TEMP flag implied, I would have understood that it had nothing to offer me and my post would have been quite different ... possibly would not have come to fruition.
Basically, DESTROY() needs to be able to determine whether or not to invoke the mpfr_clear() call - and my problem is that I don't see how it can make that decision, simply because the means to distinguish one "kind" from the other doesn't exist.
The idea is probably headed for the scrap heap .... the value of what I was thinking of doing has only *limited* value in a perl context, anyway.
Cheers,
Rob