我在GeoIP 1.4.8和1.6.6上试过以下代码,它只释放valgrind报告的40个alloc中的5个分配。 我知道根据这post“仍然可以”,但我想确保在这里的情况。对我来说,看起来很奇怪的只是释放了5个分配。有任何想法吗? ==1687== HEAP SUMMARY:
==1687== in use at exit: 35,128 bytes in 35 blocks
==1687
当我尝试对我的Debian安装PHP5-geoip的,我得到一个错误: [email protected]:~# LANG=C apt-get install php5-geoip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages co
from urllib2 import urlopen
from contextlib import closing
import json
import time
import os
while True:
url = 'http://freegeoip.net/json/'
try:
with closing(urlopen(url)) as res