What happens when you 'Pack Image'? (Technical Explanation Needed)

Blender 2.79 Cycles Renderer

What exactly is happening behind the scenes when you click on ‘Pack Image’?

I went on Blender IRC Chat and couldn’t get a straight answer, so hopefully someone here can provide a good technical explanation.

Is it performing a save function on to disk, or is it just placing the image file into the blend file that resides in RAM (which can be saved to disk later on by end user)?

The reason I ask is because of the following:
On a fresh unsaved blend file, when trying to texture paint a character model that already has an assigned texture from the HDD, the painting I added to the texture will show up in Material Viewport Shading and Texture Viewport Shading, but not in Rendered Viewport Shading.
The Rendered Viewport Shading only shows pink/purple, unless I click ‘Pack Image’.
I don’t mind using ‘Pack Image’ if it’s just packing the image file into the active blend file in RAM, since I may not always want to save the blend projects to disk.
I just want to see how the new paint job looks before closing Blender. If it looks really good and I want to continue working on it later, then sure, I will be happy to save the blend project to disk, but if I just want to exit Blender without saving the blend project, then I hope the packed images aren’t remaining on my HDD (eating HDD space).
Hope someone can clear up any misconceptions I may have. Thank you.

Hi, maybe this link will help


packing does as you would expect. it makes the data a part of the blend in ram until saved, then its a part of the blend.

the biggest waste of hdd space is autosaves and last sessions piling up in the os temp directory. for win7 its in C:\Users%user%\appdata\local emp\

Thank you!