The governing body of any school district may use the buildings, grounds, and equipment of the district, or any of them, to carry out the purposes of this chapter, or may grant the use of any building, grounds, or equipment of the district to any other public authority for the purposes, whenever the use of the buildings, grounds, or equipment for community recreational purposes will not interfere with use of the buildings, grounds, and equipment for any other purpose of the public school system. Nothing in this section is intended to repeal any provision of, or to restrict or otherwise affect the use of school buildings under Sections 40040 to 40058, inclusive.