diff --git a/mllib/src/main/scala/org/apache/spark/mllib/optimization/LBFGS.scala b/mllib/src/main/scala/org/apache/spark/mllib/optimization/LBFGS.scala index 900eec18489c133f4c6c568caf0da9dd5200a832..e0e41f711b981c4481f8b0747d10f5961c3adb18 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/optimization/LBFGS.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/optimization/LBFGS.scala @@ -252,6 +252,9 @@ object LBFGS extends Logging { (grad1, loss1 + loss2) }) + // broadcasted model is not needed anymore + bcW.destroy() + /** * regVal is sum of weight squares if it's L2 updater; * for other updater, the same logic is followed.