In The Giver, when the former Receiver had herself "released," the memories given her to ran away or died. So, applying this to the ending of the story, it seems to me that Jonas died with Gabriel. So, do all the memories received go back to the citizens, or do they simply disappear with Jonas?
In one session of training that Jonas has with the old Giver, he learns of Rosemary and her request for "release." Release is what is Jonas's world terms euthanasia. With her death, the Giver explains that "the memories came back to the people." With this information and with more content from Chapter 20, the reader may surmise that the memories from the Giver return to the society when Jonas and Gabriel escape to Elsewhere. Also, further indications in the text suggest that the two boys do not die.
Now, regarding the departure of Jonas and Gabriel from their society, details in Chapter 20 suggest that Jonas and Gabriel escape the society and reach another place. In the final chapter, Jonas approaches the summit of a hill and he suddenly begins to feel happy. He recalls his family and friends, and the Giver:
He reached the place where the hill crested and could feel the ground under his snow-covered feet become level. It would not be uphill anymore.
"We're almost there, Gabriel," he whispered..."I remember this place, Gabe."....This [memory] was something that he could keep. It was a memory of his own.
[They were led to] the place that he had always felt was waiting, the Elsewhere that held their future and their past.
Important to consider is the content of the lines cited above: "This was something that he could keep. It was a memory of his own." Apparently, then, the memories that the Giver has passed to him will return to the society as did those of Rosemary, but the memory of the particular hill must have been innate in Jonas, something from the past of his family that he has somehow had retained in his mind, perhaps, just as certain characteristics are retained in people's DNA; therefore, it belongs to him. This idea is reinforced as later Jonas uses his "final strength and a special knowledge that was deep inside him" as he finds a sled that was "waiting for them at the top of the hill." When he and the baby ride downward in the sled, Jonas feels "certainty and joy" and hears people singing. Thus, the reader can assume that the boys survive and enter the world of Elsewhere, and the memories that the Giver instilled in Jonas are returned to the society, but his more atavistic memories, like that of recalling the hill and the area below it, are uniquely Jonas's.