Pass copies of DataFrames instead of views
As the memory leak may be caused by improperly de-referenced objects, better pass copies of DataFrames instead of views.

In a subsequent PR I could try to optimize memory usage by not storing unnecessary data.
Pass copies of DataFrames instead of views: As the memory leak may be caused by improperly de-referenced objects, better pass copies of DataFrames instead of views.

In a subsequent PR I could try to optimize memory usage by not storing unnecessary data.