Hi,

I want to use the petsc library in a shared library which I'm dynamically 
loading in my main program. Therefore I'm not using the functions to destroy a 
Vector such as VecDestroy. If I use the function I got an segmentation fault 
error. Of course I have a memory leak, because I'm not using the functions to 
destroy my vectors. Is there a simple example how to use the petsc-library in a 
program like the following pseudo-code:

main{

 for 1 to 10 

   do_something 

   call function_to_solve_Ax=b_with_petsc

   do_something

 end

}

Reply via email to