[Melbourne-pm] recovering memory used in IO::String or similar

Mathew Robertson mathew.blair.robertson at gmail.com
Sat Sep 11 02:23:08 PDT 2010


Have you tried 'truncate'  (see "perldoc IO::String")

cheers,
Mathew

On 11 September 2010 08:03, Malcolm Herbert <melbourne-pm at mjch.net> wrote:
> Sent again from the correct address ...
>
> On Sat, 11 Sep 2010 07:23 +1000, "Malcolm Herbert" <mjch at mjch.net>
> wrote:
>> I want to be able to use an IO::String file handle interface in order to
>> interact with one particular class, however I don't want all the data I
>> shove into the string to remain hanging around but be able to be retired
>> without closing and re-opening the handle - is there a way to do this?
>>
>> I have tried to resize the underlying tied variable with substr and
>> remove the aging data that way however this seems to remove the
>> association with the original tied variable ... plus leads to problems if
>> the class I'm using keeps internal state about the handle ...
>>
>> Regards,
>> Malcolm
>
> --
> Malcolm Herbert                                This brain intentionally
> mjch at mjch.net                                                left blank
>
> _______________________________________________
> Melbourne-pm mailing list
> Melbourne-pm at pm.org
> http://mail.pm.org/mailman/listinfo/melbourne-pm
>


More information about the Melbourne-pm mailing list