igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] igraph_get_all_shortest_paths memory problem


From: Tamas Nepusz
Subject: Re: [igraph] igraph_get_all_shortest_paths memory problem
Date: Wed, 02 Mar 2011 15:31:43 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7

> I change my code, now i dont use that calloc(), but i have the same problem.
Because this time you are not destroying/freeing the vectors in your
inner for loop in CreateSMatrix. igraph_get_all_shortest_paths will
*allocate* and *initialize* igraph_vector_t objects on the heap as it
finds new shortest paths and stores the pointers to these in the
igraph_vector_ptr_t structure you specify. After you are done with the
shortest paths, you have to *destroy* and *free* these igraph_vector_t
objects.

-- 
Tamas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]