Slowness in Destroying Widgets

I made an application in Photon 1.12 that’s a kind of graphical editor. It has a function which is responsible for the cleaning of the drawing area. This function consists of a loop where is called, at each iteraction, the library functions PtDestroyWidget, PtSyncPhoton and PtWidgetBrotherBehind, resulting in the elimination of all the graphical objects.
The problem is that when I have a certain quantity of these objects in my drawing area, the cleaning function takes too much time to execute, and the greather is this quantity, more is the time to eliminate all the widgets, in such a exponencial way.
Could anyone give me some help?

try this:
PtContainerHold (ABW_WgtContainer);
PtClearWidget (ABW_WgtContainer);
PtContainerRelease (ABW_WgtContainer);