Fixed memory leak in DataLoader.py