Here's what I have - I made it as to be as classical of a electromagnet as possible:
a) Soft iron "U" shaped round bar-stock, ends machined to be flat & parallel. Spool of copper wire slid over one leg of this "U" shape iron.
b) Soft iron flat "keeper" bar to go across the ends of part "a" above
Momentarily connect the wire across a battery: the flat bar jumps to, and becomes firmly attached to the electromagnet.
Flat bar stays firmly attached...
as long as I don't pull it off...
...for months without losing strength.
Yet, when I do remove it, there is no remaining "pull" that attracts the flat bar back to the U shape rod... so it's not becoming "permanently magnetized"... which is why soft iron was used.
Also, if a flashlight bulb is connected across the ends of the wire before removing the "keeper" bar, the bulb flashes. (in this case, the "keeper" is quickly smacked with a screwdriver handle in order to get high detachment speed.
This happens no matter how long it's been sitting on my shelf... or even hanging upside-down by the "keeper" bar... with the weight of the electromagnet hanging by the keeper bar.