Certainly something to be conscious of. I should have made clear that for the most part, the code I'm talking about is from entities owned by myself and possibly one other person, a business partner I've worked with on multiple projects for many years. No outside investment or shareholders. This greatly simplifies the IP issues.
Oops.. replied to this one level up. Sorry. In terms of the original company ceasing to exist, I'm not sure. Before dissolving, I do the Asset Purchase Agreement.
IANAL, but I use a pretty basic Asset Purchase Agreement between the old entity and the new to cover the IP. Again, since what I'm talking about is myself (and possibly one other person) as the shareholder, it's quite painless.