1. A divorce does not change your obligations under an I-864. You will be obligated until either she becomes a US citizen, or she has accrued 40 quarters of work credit, or has lost her status as a legal resident, or she has died.
2. The I-864 is a contract between the sponsor and the US government to re-imburse for certain public benefits. I-864s have also been used by family court judges in divorce cases.