Method for managing the endurance of a non-volatile rewritable memory including a plurality of ordered stacks of a lower electrode, a layer of dielectric material and an upper electrode, the dielectric material of each stack being capable of switching between: - a high resistance state, in which said dielectric material has a first resistance value (Roff), and - a low resistance state, in which said dielectric material has a second resistance value (Ron), a switching between the high resistance state and the low resistance state allowing a writing in the memory and a switching between the low resistance state and the high resistance state allowing an erasure in said memory, characterised in that it comprises at least one of the following operations: - at the end of each erasure operation: reading the first resistance value (Roff) of the dielectric material, comparing said first resistance value with a first predetermined median resistance value (Roffmed), and determining the writing programming conditions (Vset, Tset) from the results of said comparison; the first predetermined median resistance value (Roffmed) following a first predetermined dependency law linking the writing programming conditions and the first read resistance value, the value of the writing programming conditions being deduced from said first predetermined dependency law; and - at the end of each writing operation: reading the second resistance value (Ron) of the material, comparing said second resistance value with a second predetermined median resistance value (Ronmed), and determining the erasure programming conditions (Vreset, Treset) from the results of said comparison, the second median resistance value (Ronmed) following a second predetermined dependency law linking the erasure programming conditions and the second read resistance value, the value of the erasure programming conditions being deduced from said second predetermined dependency law; said writing and erasure programming conditions being applied to the electrodes (11, 12) of the stack during, respectively, following writing and erasure operations in order to limit the generation of defects in the dielectric material. - a high resistance state, in which said dielectric material has a first resistance value (Roff), and - a low resistance state, in which said dielectric material has a second resistance value (Ron), - at the end of each erasure operation: reading the first resistance value (Roff) of the dielectric material, comparing said first resistance value with a first predetermined median resistance value (Roffmed), and determining the writing programming conditions (Vset, Tset) from the results of said comparison; the first predetermined median resistance value (Roffmed) following a first predetermined dependency law linking the writing programming conditions and the first read resistance value, the value of the writing programming conditions being deduced from said first predetermined dependency law; and - at the end of each writing operation: reading the second resistance value (Ron) of the material, comparing said second resistance value with a second predetermined median resistance value (Ronmed), and determining the erasure programming conditions (Vreset, Treset) from the results of said comparison, the second median resistance value (Ronmed) following a second predetermined dependency law linking the erasure programming conditions and the second read resistance value, the value of the erasure programming conditions being deduced from said second predetermined dependency law;