GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Math::Prime::Util::MemFree(3) User Contributed Perl Documentation Math::Prime::Util::MemFree(3)

Math::Prime::Util::MemFree - An auto-free object for Math::Prime::Util

Version 0.73

  use Math::Prime::Util;

  {
    my $mf = Math::Prime::Util::MemFree->new;
    # ... do things with Math::Prime::Util ...
  }
  # When the last object leaves scope, prime_memfree is called.

This is a more robust way of making sure any cached memory is freed, as it will be handled by the last "MemFree" object leaving scope. This means if your routines were inside an eval that died, things will still get cleaned up. If you call another function that uses a MemFree object, the cache will stay in place because you still have an object.

Creates a new auto-free object. This object has no methods and has no data. When it leaves scope it will call "prime_memfree", thereby releasing any extra memory that the Math::Prime::Util module may have allocated.

Memory is not freed until the last object goes out of scope. "prime_memfree" may always be called manually. All memory is freed at "END" time, so this is mainly for long running programs that want extra control over memory use.

Dana Jacobsen <dana@acm.org>

Copyright 2012 by Dana Jacobsen <dana@acm.org>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2018-11-15 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.