Page 1 of 1

Memory leak GAMS Java API

Posted: Tue Jul 30, 2019 3:04 pm
by Alexey
Hi colleagues!

Some time ago one of my colleague asked me to write a program for retrieving data from gdx file. I wrote on Java and used GAMS Java API. And the main issue is that after creating GAMSDataBase and Workspace and data retrieving we try to release allocated resources by calling method "dispose()" and nothing happens. After several times we exceed maximum of available memory and the system fall down.

I used different tools for investigation and found that Java works in correct way (Visual VM, debugger, VMMap), but native libs which is called under the hood allocate resources and don't release it.

Version of GAMS API - 27.3
Java version - 8
OS - Linux Ubuntu 18.04 LTS

Same code works perfect in Windows OS, but we have to use linux.

Can you advice how to solve this problem?