Bug? Rstudio swallows up all the available ram

Hello everyone,

I am on Ubuntu 18.04 running and R version 3.5.1 in Rstudio 1.1.456 (the latest stable).
I have a data file of 5 Gb that I can't load. When I try, it fills up my 32 Gb of memory.
However, when using R in command line version in a terminal, I can load that data file, it takes up to 18 Gb of ram and calling gc() subsequently reduces the ram used to 5 Gb.

I also noticed that after killing Rstudio, there is still a process called "rsession" taking around 9 Gb of ram running that I must manually kill otherwise I won't get my ram back.

Have you any idea of where does this problem come from?