Example #1
0
void
pageclose(Page *p)
{
	Page *c, *nc;

	if(p == selpage)
		selpage = nil;
	pageabort(p);
	closeimages(p);
	urlfree(p->url);
	p->url = nil;
	if(p->doc){
		freedocinfo(p->doc);
		p->doc = nil;
	}
	layfree(p->lay);
	p->lay = nil;
	freeitems(p->items);
	p->items = nil;
	for(c=p->child; c!=nil; c=nc){
		nc = c->next;
		pageclose(c);
		free(c);
	}
	p->child = nil;
	closerunestr(&p->title);
	closerunestr(&p->refresh.rs);
	p->refresh.t = 0;
	p->pos = ZP;
	p->top = ZP;
	p->bot = ZP;
	p->loading = p->aborting = FALSE;
}
Example #2
0
void
freeurlwin(URLwin *u)
{
	freeitems(u->items);
	u->items = nil;
	freedocinfo(u->docinfo);
	u->docinfo = nil;
	free(u);
}