1. A method for object persistency, comprising: running, using a processor of a computer system, a program; setting a transaction indicator to indicate whether an object of the running program belongs to a transaction process; in response to determining that the object is a non-persistent object and that the transaction indicator indicates that the object does not belong to a transaction process, moving the object into a random access memory; and performing a clearing process; and in response to determining that the object is a persistent object, storing the object into a phase change memory.