MEMPHIS, Tenn. - In Phil Jackson's second trade as Knicks president, he was able to do something few thought was possible: He moved J.R. Smith.

The enigmatic shooting guard and former Sixth Man of the Year was traded to Cleveland Monday night along with Iman Shumpert in a three-team deal in which the Oklahoma City Thunder obtained Cavaliers shooting guard Dion Waiters.

This was a straight salary dump and housecleaning for the Knicks. They're clearing the decks for this summer and looking at this as addition by subtraction. They hope to be major players in free agency, although their miserable season could deter marquee free agents from signing. (They fell to 5-32 Monday night with a 105-83 loss to the Grizzlies, their 12th straight defeat and 22nd in 23 games.)

The Knicks opened an additional $6.4 million to use in free agency in July by trading Smith, whom they had been trying to move since early in the season. He has a $6.4-million player option for next season that he is expected to pick up.

In return, the Knicks will get Brooklyn native Lance Thomas from Oklahoma City and big men Lou Amundson and Alex Kirk from the Cavaliers.

The Knicks plan to waive Amundson and Kirk, according to a team source. They might hold on to Thomas, a 6-8 forward who was averaging 5.1 points for the Thunder.

The Knicks will get a 2019 second-round pick from Cleveland. They also will receive two trade exceptions -- roughly $6 million for Smith and $2.5 million for Shumpert. They can use the exceptions in trades for players making those salaries.

In a separate move, the Knicks waived center Samuel Dalembert. His contract becomes guaranteed Friday, so by doing this, they will save $2 million. They had been trying to deal Dalembert but were unable to find a trade partner. The Knicks had to waive him by Wednesday because it takes 48 hours to clear waivers.

The Knicks have two roster spots, but it didn't appear they would fill them immediately. They now have only four players under contract for next season: Carmelo Anthony, Jose Calderon, Tim Hardaway Jr. and Cleanthony Early. Pablo Prigioni has a partial guarantee.

The Knicks pulled Smith and Dalembert about a half-hour before the start of Monday night's loss to the Grizzlies, leaving them with nine available players. Shumpert was sidelined with a shoulder injury and unable to play. The Knicks also were missing Anthony, Amar'e Stoudemire and Andrea Bargnani, all of whom are injured.

Smith was a big part of the Knicks' 54-win team two seasons ago. He averaged 18.1 points and was named Sixth Man of the Year.

He fell out of favor with the organization last season after a series of incidents, including being suspended for violating the league's antidrug policy and tweeting about "betrayal" after the Knicks waived his brother Chris. He also was benched twice and fined by the league for untying opponents' sneakers.

Smith, who has been hampered by a left foot injury, is averaging 10.9 points in 24 games this season.

The Knicks discussed moving Shumpert the past three seasons. Even if they hadn't dealt him, he wasn't expected to be back next season. They declined to extend his rookie contract by the Oct. 31 cutoff, so Shumpert was going to be a restricted free agent this summer. He is averaging 9.3 points in 24 games.

In Jackson's first trade, he acquired Dalembert, Calderon, Shane Larkin, Wayne Ellington and two second-round draft picks from Dallas for Tyson Chandler and Raymond Felton last summer. They thought Dalembert would anchor their interior defense, but like the Knicks' season, it hasn't panned out the way they had hoped. Dalembert lost his starting job to Cole Aldrich and is averaging 4.0 points and 5.3 rebounds in 17 minutes.

The Dolan family owns controlling interests in the Knicks, Madison Square Garden and Cablevision. Cablevision owns Newsday.