From: Alfred Hilscher <Alfred.Hilscher@icn.siemens.de>
Subject: deallocation tasks
Date: 2000/05/03
Date: 2000-05-03T00:00:00+00:00 [thread overview]
Message-ID: <39102BF9.584EB022@icn.siemens.de> (raw)
Hi,
does anyone have a proposal for the following problem ?
What I want do is this: I have a loop that reads input and processes it.
If the input is something that would require long runtime, I want create
a new task so that it can run in background. But if the task terminates
I think I should free the (heap) memory.
My code would look someting like this:
task type t is ...
type a_t is access t;
n_t : a_t;
...
loop
-- get input
if -- input requires less time
then
-- consume it
else -- input requires much time, start background task
n_t := new a_t(input); -- memory allocated here should be
deallocated after task termination
end if;
end loop;
Any suggestions how to 'DEALLOCATE' the memory ? There can be more than
one task at a time. Any other ideas ?
next reply other threads:[~2000-05-03 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-03 0:00 Alfred Hilscher [this message]
2000-05-03 0:00 ` deallocation tasks Robert A Duff
2000-05-04 0:00 ` Pascal Obry
2000-05-04 0:00 ` Robert A Duff
2000-05-05 0:00 ` Alfred Hilscher
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox