High use of memory when processing objects - MapInfo Pro

Affected products: MapInfo Pro

Issue

The problem is manifested in this example where there is a program that loops through a table that has some 34000 objects. For each row it uses a function to modify the map object and replaces it back into the table. Whilst there are a few global variables most are contained within individual procedures. When running MapInfo Pro, it initially indicates 200 mb of memory used, which is normal, but whilst running the program the memory usage keeps going up and it often runs out of physical memory so slows down. By the time the program ends and all tables are closed. It still shows over 800 mb of memory used. Even after all the tables are closed and no program is running, MapInfo Pro is still retaining so much memory in usage.
The same problem is seen in MapInfo Pro v16, 17 and 2019. 

Cause

MapInfo Pro is not freeing memory when it is supposed to for certain operations.
 

Resolution

UPDATED: April 6, 2020
This bug, MIPRO-115609, was fixed in the MapInfo Pro 2019.1 release.