are treated differently.
1). The cost related to original life of loan (e.g., point,...) - you can recap immediately when refinancing in the same year as yearly cost.
2). The cost not relating to the life of loan - you'll have to add to the cost base. This has nothing to do with refinancing.
-----------------
2) usually is the majority of the closing cost.