Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Memory Leaks with pointers

Thread Tools

Memory Leaks with pointers

Posts: n/a
Consider the following:
type a_t;
type a_t_ptr is access a_t;

type b_t;
type b_t_ptr is access b_t;

type a_t is array(integer range <>) of integer;
type b_t is array(integer range <>) of a_t_ptr;


variable P : b_t_ptr;

P := new b_t(1 to 10);

for i in 1 to 10 loop
p(i) = new a_t(1 to 10);
end loop;

end process;

have I just caused a memory leak by not deallocating all the elements
in the top level array? would you have to quit the simulator to free
it again, or just end the simulation?
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Leaks in ASP.NET =?Utf-8?B?RnJhbmsxMjEz?= ASP .Net 12 03-17-2013 10:03 AM
pointers, pointers, pointers... cerr C Programming 12 04-07-2011 11:17 PM
Our memory leaks? James Hunter Ross ASP .Net 2 10-20-2005 08:25 PM
ASP.NET - Detecting memory leaks ASP.Confused ASP .Net 2 07-16-2004 04:24 PM
memory leaks with firebird? astromannix Firefox 2 07-26-2003 12:10 AM