Link to home
Start Free TrialLog in
Avatar of ghjlk
ghjlk

asked on

FREE TCOMPONENTLIST

FREE TCOMPONENTLIST

When I try to free TComponentList I get this error :

ACCESS VIOLATION,

and every time (after free method) when I try to use TComponentList named ComponentList.

How to solve this problem ?

Thanks.
Avatar of kretzschmar
kretzschmar
Flag of Germany image

you should show how you free and access your list
Avatar of ghjlk
ghjlk

ASKER

//first oncreate event
componentlist.create;

//then two methods of create components
componentlist.add &
componentlist.insert

//in componentlist I put Forms, ActiveX components and others.


//section new
while componentlist.count>0 do
TControl(componentlist[0]).Free;

componentlist.free;
componentlist.create;

Thanks.
Avatar of ghjlk

ASKER

Sorry :
componentlist:=TComponentlist.create;
ASKER CERTIFIED SOLUTION
Avatar of Cynna
Cynna

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial