I am trying to call DLL file, which includes IMSL, from Visual Basic to perform a simulation.
However, when I call this DLL too many times, the whole program crashes(disappear). Is this a memory leak problem? What can I do? Any suggestions will be welcome. Thanks in advance.
1.Fortran codes: test.f90
!DEC$ ATTRIBUTES DLLEXPORT, ALIAS : "betarnd" :: betarnd
double precision :: y(m),a,b
end subroutine betarnd
2. DF /dll test.f90
3. VB codes
Declare Sub betarnd Lib "test.dll" (ByRef Y As Double, a As Double, b As Double, m As Long)