Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Modula 3 > Can a WeakRef b...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 94 of 148
Post > Topic >>

Can a WeakRef be overseen?

by Henning Thielemann <iakd0@[EMAIL PROTECTED] > Apr 13, 2004 at 03:57 PM

I have added some debug output to the wrapper

PROCEDURE CleanupPlan (<* UNUSED *> READONLY w: WeakRef.T; r: REFANY) =
  BEGIN
    IO.Put("Cleanup_Plan\n");
    FFTWLongRealRaw.DestroyPlan(NARROW(r, Plan)^);
  END CleanupPlan;

that I use as a cleanup procedure for a WeakRef:

  ...
    plan^ := FFTWLongRealRaw.PlanDFT1D(n, in[0], out[0], dirToSign[sign],
                                       LOOPHOLE(flags, C.unsigned_int));
    EVAL WeakRef.FromRef(plan, CleanupPlan);
    RETURN plan;
  ...

Suprisingly the "Cleanup_Plan" won't be printed in most cases.  I use only
short test programs that some computations and then quit immediately. Does
the result mean that the wrapper wasn't called or does it mean that the
output of the text failed?




 3 Posts in Topic:
Can a WeakRef be overseen?
Henning Thielemann <ia  2004-04-13 15:57:10 
Re: Can a WeakRef be overseen?
Olaf Wagner <wagner@[E  2004-04-14 00:33:23 
Re: Can a WeakRef be overseen?
"Rodney M. Bates&quo  2004-04-14 16:25:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue May 13 18:45:00 CDT 2008.