I'm going to answer in regard to France -- and I'm thinking the British example followed a similar pattern.
France continued to have a military presence in Africa as decolonization proceeded, saying this was a way to provide security. France had defense agreements with about half of the African nations. France became known as the "gendarme" (police force) of Africa.
France also maintained strong economic ties to the African continent. France imported significant amounts of raw materials and energy resources (like oil) from Africa.
So, continued military and economic ties would be two ways you could list in responding the question you posted.