Check settings.enableGc before starting function GC