A polymer consisting mainly of structural units represented by the general formula (1), wherein the total molar amount of terminal aldehyde groups and acetal groups is 0.6 mol % or smaller based on the total molar amount of the structural units represented by the general formula (1). —[—(—CHR1—)n—CX1R2—CX2R3-]— (1) (In the formula, n is an integer of 2 to 10; X1 and X2 each represents —H, —OH, or a functional group capable of being converted into —OH, provided that at least one of X1 and X2 is hydroxy or a functional group capable of being converted into hydroxy; and R1, R2, and R3 each represents —H or C1-5 alkyl, aryl, aralkyl, or heteroaryl and the two or more R1's may be different).